window.__require = function e(t, i, n) {
function o(s, r) {
if (!i[s]) {
if (!t[s]) {
var c = s.split("/");
c = c[c.length - 1];
if (!t[c]) {
var l = "function" == typeof __require && __require;
if (!r && l) return l(c, !0);
if (a) return a(c, !0);
throw new Error("Cannot find module '" + s + "'");
}
}
var u = i[s] = {
exports: {}
};
t[s][0].call(u.exports, function(e) {
return o(t[s][1][e] || e);
}, u, u.exports, e, t, i, n);
}
return i[s].exports;
}
for (var a = "function" == typeof __require && __require, s = 0; s < n.length; s++) o(n[s]);
return o;
}({
Global: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "00760kypz5JfKUYEDifEhBO", "Global");
window.ISFORMAL = !0;
window.G_FRAME = {
VERSION: 1,
YYB_VERSION: !1,
IS_NEWUSER: !1,
JMSTR: "POz4jlFDrjiOUUnIN5ieaiTMXCSVz8CC"
};
window.G_COM = {
PATH_LIST: [],
MONSTER_GID: 1,
MONSTER_RADIUS: 50,
GUN_OFFSET: 60,
TOWER_ID_BEGIN: 1,
TOWER_ID_END: 28,
DEL_WIDTH: 100,
FULL_RANGE: 2e3,
WORD_CLEAR_TIME: .5,
WORD_TIME_MAX: 5,
EFFECT_CLEAR_TIME: .5,
EFFECT_TIME_MAX: 3,
STOP_GAME: !1,
FIRST_ENTER: !0,
LOAD_SUBPACKET: !0,
LOAD_AUDIOPACKET: !0,
G_HEIGHT: 1280
};
window.G_POS = {
P_MAIN_TOWER: cc.v2(360, 765),
P_MONEY_GLOBAL: void 0,
P_MONEY: void 0,
P_FREE: void 0,
P_FREE_GLOBAL: void 0,
P_DEL: void 0,
B_DEL: void 0,
B_GUIDE: void 0,
P_FRIEND_GROUP_GLOBAL: void 0,
P_TURNTABLE: void 0
};
window.G_BULLET = cc.Enum({
STR: 1,
MISSILE: 2,
GATLIN: 3,
LASER: 4,
LIGHT: 5,
RING: 6,
BLOCK: 7
});
window.G_VIDEO_FROM = cc.Enum({
SIGN: 1,
ONLINE: 2,
TIME: 3,
COMBINE: 4,
ROLLER: 5,
DAILY: 6,
ACHIEVE: 7,
SUPPLY: 8,
DROP: 9,
MONEY_SIGN: 10,
MONEY_CLOCK: 11,
PHONE_TICKET: 12,
PHONE_AWARD: 13,
VIDEO_TIP: 14
});
window.G_MONEY_FROM = cc.Enum({
COMBINE: 1,
RANDOM: 2,
TIME: 3,
DAILY: 4,
ACHIEVE: 5,
ROLLER: 6,
ONLINE: 7,
MONSTER: 8,
SIGN: 9,
LEVEL: 10,
SELL: 11,
DROP: 12,
FAIL: 13,
OTHER: 14,
QQBOX: 15
});
window.G_WINDOW_FROM = cc.Enum({
NORMAL: 0,
DIVIDEND: 1,
SIGN: 2,
TASK: 3,
ROLLER: 4,
NEW: 5,
LEVEL: 6,
WITHDRAWAL: 7,
TIXIAN: 8,
DIDFROM: 9,
GAMEBOX: 10,
LOTTERY: 11,
PHONE_ROLL: 12,
FAMILY: 13,
TURNTABLE: 21,
EXTTOWER: 22,
MONEY_BOX: 23,
MONEY_BOX_VIDEO: 24,
FULL_SCREEN_OPEN: 14,
FULL_SCREEN_WATCHED: 15,
VIDEO_TIP_LEVEL_UP: 16,
VIDEO_TIP_WALLET: 17,
VIDEO_TIP_PHPNE: 18,
VIDEO_TIP_UNLOCK: 19,
VIDEO_TIP_RED: 20,
INIT: 101,
SPLASH: 102,
FEATURE: 103,
UPDATE: 104,
STOP: 105,
WXLOGIN: 106,
REGISTER: 107,
HALL: 108,
GUIDE_1: 111,
GUIDE_2: 112,
GUIDE_3: 113,
GUIDE_4: 114,
GUIDE_5: 115
});
window.G_NODE = {
MAIN_GUIDE: void 0,
WINDOW: void 0,
GUIDE: void 0,
HALL: void 0,
QUICK_TOWER: void 0,
TIME_MONEY: void 0
};
window.G_VIDEO_SDK = cc.Enum({
CSJ: 1,
GDT: 2,
BAIDU: 3,
KUAISHOU: 4,
LAIWAN: 5
});
window.G_EXP_FROM = cc.Enum({
VIDEO: 0,
COMBINE: 1,
TASK: 2,
SIGN: 3,
TIME_MONEY: 4,
RANDOM_MONEY: 5,
ROLLER: 6
});
window.G_MONEY_FLOW = cc.Enum({
MONSTER: 1,
TOWER: 2
});
window.G_WALLET_WAY = cc.Enum({
TURNTABLE: 1,
MASTER: 2,
PHONE: 3
});
cc._RF.pop();
}, {} ],
HTTP: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "28587ERr1tOqaQsOMcjV1dC", "HTTP");
window.HTTP = {
HTTPTimeout: 5e3,
maxFailTime: 2,
fileList: {},
GET: function(e, t, i, n) {
if ("string" == typeof e) {
var o = e + "?", a = !1, s = o;
s += this.concatTab(t);
console.log("[HTTP]", s);
o += this.encodeTab(t);
var r = !1, c = function() {
if (!r) {
r = !0;
this.fileList[o] || (this.fileList[o] = 0);
this.fileList[o]++;
if (this.fileList[o] >= this.maxFailTime) {
if (n && !a) {
a = !0;
n();
}
this.fileList[o] = 0;
} else this.GET(e, t, i, n);
}
}.bind(this), l = function() {
r = !0;
this.fileList[o] = 0;
}.bind(this), u = cc.loader.getXMLHttpRequest();
u.onreadystatechange = function() {
if (4 === u.readyState) if (u.status >= 200 && u.status < 300) {
if (i) {
var e = u.response;
console.log("[HTTP RECV]", e);
var t = e && JSON.parse(e);
i(t);
}
l();
} else {
c();
console.log("[HTTP RECV ERROR]", o, u.readyState, u.status);
}
};
u.onerror = function(e) {
console.log("[连接失败]");
console.log(e);
c();
};
u.open("GET", o, !0);
u.timeout = this.HTTPTimeout;
u.send();
cc.sys.isNative && setTimeout(function() {
!r && c();
}, this.HTTPTimeout);
} else cc.error("url mush be a string", e);
},
GET2: function(e, t, i) {
var n = !1, o = function() {
if (!n) {
n = !0;
i();
}
}.bind(this), a = function() {
n = !0;
}.bind(this), s = cc.loader.getXMLHttpRequest();
s.onreadystatechange = function() {
if (4 === s.readyState) if (s.status >= 200 && s.status < 300) {
if (t) {
var i = s.response;
console.log("rev:", i);
var n = i && JSON.parse(i);
t(n);
}
a();
} else {
o();
console.log("rev error:", e, s.readyState, s.status);
}
};
s.onerror = function(e) {
console.log("[连接失败]");
console.log(e);
o();
};
s.open("GET", e, !0);
s.timeout = this.HTTPTimeout;
s.send();
},
GET3: function(e, t, i) {
var n = cc.loader.getXMLHttpRequest();
n.onreadystatechange = function() {
if (4 === n.readyState) if (n.status >= 200 && n.status < 300) {
var e = n.response;
t && t(e);
} else i && i();
};
n.onerror = function(e) {
console.log("[连接失败]");
i && i();
};
n.open("GET", e, !0);
n.timeout = this.HTTPTimeout;
n.send();
},
POST: function(e, t, i, n) {
var o = !1, a = function() {
if (!o) {
o = !0;
console.log(e, "[返回失败]");
n && n();
}
}, s = this.encodeTab(t);
console.log("POST url:", e, t);
if (s.length > 4e3) cc.error("数据过长,发送失败"); else {
var r = cc.loader.getXMLHttpRequest();
r.onreadystatechange = function() {
if (4 === r.readyState) if (r.status >= 200 && r.status < 300) {
var e = r.responseText;
console.log("http 返回信息", e);
if (i) {
var t = e;
try {
t = JSON.parse(e);
} catch (e) {}
i(t);
}
} else a();
};
r.onerror = function() {
a();
};
r.open("POST", e, !0);
r.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
r.timeout = this.HTTPTimeout;
r.send(s);
}
},
encodeTab: function(e) {
var t = "";
for (var i in e) null !== e[i] && void 0 !== e[i] && (t = t + i + "=" + this.urlencode(e[i]) + "&");
return t = t.slice(0, -1);
},
concatTab: function(e) {
var t = "";
for (var i in e) t = t + i + "=" + e[i] + "&";
return t = t.slice(0, -1);
},
urlencode: function(e) {
e = (e + "").toString();
return encodeURIComponent(e).replace(/!/g, "%21").replace(/'/g, "%27").replace(/\(/g, "%28").replace(/\)/g, "%29").replace(/\*/g, "%2A").replace(/%20/g, "+");
}
};
cc._RF.pop();
}, {} ],
NPCNameData: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "9fb6f/3VqRNBpFW6kQDd3LF", "NPCNameData");
var n = e("csvData"), o = cc.Class({
extends: n,
name: "NPCNameData",
properties: {
_fileName: {
override: !0,
default: "NPCName"
}
},
getRandomName: function() {
var e = this.getAllDatas(), t = e[util.randomRange(1, 2920)].name || e[1].name;
return util.cutstr(t, 10);
}
});
window.NPCNameData = new o();
cc._RF.pop();
}, {
csvData: "csvData"
} ],
TTQRcode: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "6bf76ID+89AH7t4VTJUxY9+", "TTQRcode");
function n(e) {
this.mode = a.MODE_8BIT_BYTE;
this.data = e;
}
n.prototype = {
getLength: function(e) {
return this.data.length;
},
write: function(e) {
for (var t = 0; t < this.data.length; t++) e.put(this.data.charCodeAt(t), 8);
}
};
var o = function(e, t) {
this.typeNumber = e;
this.errorCorrectLevel = t;
this.modules = null;
this.moduleCount = 0;
this.dataCache = null;
this.dataList = new Array();
};
o.prototype = {
addData: function(e) {
var t = new n(e);
this.dataList.push(t);
this.dataCache = null;
},
isDark: function(e, t) {
if (e < 0 || this.moduleCount <= e || t < 0 || this.moduleCount <= t) throw new Error(e + "," + t);
return this.modules[e][t];
},
getModuleCount: function() {
return this.moduleCount;
},
make: function() {
if (this.typeNumber < 1) {
var e = 1;
for (e = 1; e < 40; e++) {
for (var t = T.getRSBlocks(e, this.errorCorrectLevel), i = new C(), n = 0, o = 0; o < t.length; o++) n += t[o].dataCount;
for (var a = 0; a < this.dataList.length; a++) {
var s = this.dataList[a];
i.put(s.mode, 4);
i.put(s.getLength(), v.getLengthInBits(s.mode, e));
s.write(i);
}
if (i.getLengthInBits() <= 8 * n) break;
}
this.typeNumber = e;
}
this.makeImpl(!1, this.getBestMaskPattern());
},
makeImpl: function(e, t) {
this.moduleCount = 4 * this.typeNumber + 17;
this.modules = new Array(this.moduleCount);
for (var i = 0; i < this.moduleCount; i++) {
this.modules[i] = new Array(this.moduleCount);
for (var n = 0; n < this.moduleCount; n++) this.modules[i][n] = null;
}
this.setupPositionProbePattern(0, 0);
this.setupPositionProbePattern(this.moduleCount - 7, 0);
this.setupPositionProbePattern(0, this.moduleCount - 7);
this.setupPositionAdjustPattern();
this.setupTimingPattern();
this.setupTypeInfo(e, t);
this.typeNumber >= 7 && this.setupTypeNumber(e);
null == this.dataCache && (this.dataCache = o.createData(this.typeNumber, this.errorCorrectLevel, this.dataList));
this.mapData(this.dataCache, t);
},
setupPositionProbePattern: function(e, t) {
for (var i = -1; i <= 7; i++) if (!(e + i <= -1 || this.moduleCount <= e + i)) for (var n = -1; n <= 7; n++) t + n <= -1 || this.moduleCount <= t + n || (this.modules[e + i][t + n] = 0 <= i && i <= 6 && (0 == n || 6 == n) || 0 <= n && n <= 6 && (0 == i || 6 == i) || 2 <= i && i <= 4 && 2 <= n && n <= 4);
},
getBestMaskPattern: function() {
for (var e = 0, t = 0, i = 0; i < 8; i++) {
this.makeImpl(!0, i);
var n = v.getLostPoint(this);
if (0 == i || e > n) {
e = n;
t = i;
}
}
return t;
},
createMovieClip: function(e, t, i) {
var n = e.createEmptyMovieClip(t, i);
this.make();
for (var o = 0; o < this.modules.length; o++) for (var a = 1 * o, s = 0; s < this.modules[o].length; s++) {
var r = 1 * s;
if (this.modules[o][s]) {
n.beginFill(0, 100);
n.moveTo(r, a);
n.lineTo(r + 1, a);
n.lineTo(r + 1, a + 1);
n.lineTo(r, a + 1);
n.endFill();
}
}
return n;
},
setupTimingPattern: function() {
for (var e = 8; e < this.moduleCount - 8; e++) null == this.modules[e][6] && (this.modules[e][6] = e % 2 == 0);
for (var t = 8; t < this.moduleCount - 8; t++) null == this.modules[6][t] && (this.modules[6][t] = t % 2 == 0);
},
setupPositionAdjustPattern: function() {
for (var e = v.getPatternPosition(this.typeNumber), t = 0; t < e.length; t++) for (var i = 0; i < e.length; i++) {
var n = e[t], o = e[i];
if (null == this.modules[n][o]) for (var a = -2; a <= 2; a++) for (var s = -2; s <= 2; s++) this.modules[n + a][o + s] = -2 == a || 2 == a || -2 == s || 2 == s || 0 == a && 0 == s;
}
},
setupTypeNumber: function(e) {
for (var t = v.getBCHTypeNumber(this.typeNumber), i = 0; i < 18; i++) {
var n = !e && 1 == (t >> i & 1);
this.modules[Math.floor(i / 3)][i % 3 + this.moduleCount - 8 - 3] = n;
}
for (var o = 0; o < 18; o++) {
var a = !e && 1 == (t >> o & 1);
this.modules[o % 3 + this.moduleCount - 8 - 3][Math.floor(o / 3)] = a;
}
},
setupTypeInfo: function(e, t) {
for (var i = this.errorCorrectLevel << 3 | t, n = v.getBCHTypeInfo(i), o = 0; o < 15; o++) {
var a = !e && 1 == (n >> o & 1);
o < 6 ? this.modules[o][8] = a : o < 8 ? this.modules[o + 1][8] = a : this.modules[this.moduleCount - 15 + o][8] = a;
}
for (var s = 0; s < 15; s++) {
var r = !e && 1 == (n >> s & 1);
s < 8 ? this.modules[8][this.moduleCount - s - 1] = r : s < 9 ? this.modules[8][15 - s - 1 + 1] = r : this.modules[8][15 - s - 1] = r;
}
this.modules[this.moduleCount - 8][8] = !e;
},
mapData: function(e, t) {
for (var i = -1, n = this.moduleCount - 1, o = 7, a = 0, s = this.moduleCount - 1; s > 0; s -= 2) {
6 == s && s--;
for (;;) {
for (var r = 0; r < 2; r++) if (null == this.modules[n][s - r]) {
var c = !1;
a < e.length && (c = 1 == (e[a] >>> o & 1));
v.getMask(t, n, s - r) && (c = !c);
this.modules[n][s - r] = c;
if (-1 == --o) {
a++;
o = 7;
}
}
if ((n += i) < 0 || this.moduleCount <= n) {
n -= i;
i = -i;
break;
}
}
}
}
};
o.PAD0 = 236;
o.PAD1 = 17;
o.createData = function(e, t, i) {
for (var n = T.getRSBlocks(e, t), a = new C(), s = 0; s < i.length; s++) {
var r = i[s];
a.put(r.mode, 4);
a.put(r.getLength(), v.getLengthInBits(r.mode, e));
r.write(a);
}
for (var c = 0, l = 0; l < n.length; l++) c += n[l].dataCount;
if (a.getLengthInBits() > 8 * c) throw new Error("code length overflow. (" + a.getLengthInBits() + ">" + 8 * c + ")");
a.getLengthInBits() + 4 <= 8 * c && a.put(0, 4);
for (;a.getLengthInBits() % 8 != 0; ) a.putBit(!1);
for (;!(a.getLengthInBits() >= 8 * c); ) {
a.put(o.PAD0, 8);
if (a.getLengthInBits() >= 8 * c) break;
a.put(o.PAD1, 8);
}
return o.createBytes(a, n);
};
o.createBytes = function(e, t) {
for (var i = 0, n = 0, o = 0, a = new Array(t.length), s = new Array(t.length), r = 0; r < t.length; r++) {
var c = t[r].dataCount, l = t[r].totalCount - c;
n = Math.max(n, c);
o = Math.max(o, l);
a[r] = new Array(c);
for (var u = 0; u < a[r].length; u++) a[r][u] = 255 & e.buffer[u + i];
i += c;
var h = v.getErrorCorrectPolynomial(l), d = new I(a[r], h.getLength() - 1).mod(h);
s[r] = new Array(h.getLength() - 1);
for (var g = 0; g < s[r].length; g++) {
var f = g + d.getLength() - s[r].length;
s[r][g] = f >= 0 ? d.get(f) : 0;
}
}
for (var p = 0, m = 0; m < t.length; m++) p += t[m].totalCount;
for (var _ = new Array(p), y = 0, D = 0; D < n; D++) for (var b = 0; b < t.length; b++) D < a[b].length && (_[y++] = a[b][D]);
for (var w = 0; w < o; w++) for (var T = 0; T < t.length; T++) w < s[T].length && (_[y++] = s[T][w]);
return _;
};
for (var a = {
MODE_NUMBER: 1,
MODE_ALPHA_NUM: 2,
MODE_8BIT_BYTE: 4,
MODE_KANJI: 8
}, s = 1, r = 0, c = 3, l = 2, u = 0, h = 1, d = 2, g = 3, f = 4, p = 5, m = 6, _ = 7, v = {
PATTERN_POSITION_TABLE: [ [], [ 6, 18 ], [ 6, 22 ], [ 6, 26 ], [ 6, 30 ], [ 6, 34 ], [ 6, 22, 38 ], [ 6, 24, 42 ], [ 6, 26, 46 ], [ 6, 28, 50 ], [ 6, 30, 54 ], [ 6, 32, 58 ], [ 6, 34, 62 ], [ 6, 26, 46, 66 ], [ 6, 26, 48, 70 ], [ 6, 26, 50, 74 ], [ 6, 30, 54, 78 ], [ 6, 30, 56, 82 ], [ 6, 30, 58, 86 ], [ 6, 34, 62, 90 ], [ 6, 28, 50, 72, 94 ], [ 6, 26, 50, 74, 98 ], [ 6, 30, 54, 78, 102 ], [ 6, 28, 54, 80, 106 ], [ 6, 32, 58, 84, 110 ], [ 6, 30, 58, 86, 114 ], [ 6, 34, 62, 90, 118 ], [ 6, 26, 50, 74, 98, 122 ], [ 6, 30, 54, 78, 102, 126 ], [ 6, 26, 52, 78, 104, 130 ], [ 6, 30, 56, 82, 108, 134 ], [ 6, 34, 60, 86, 112, 138 ], [ 6, 30, 58, 86, 114, 142 ], [ 6, 34, 62, 90, 118, 146 ], [ 6, 30, 54, 78, 102, 126, 150 ], [ 6, 24, 50, 76, 102, 128, 154 ], [ 6, 28, 54, 80, 106, 132, 158 ], [ 6, 32, 58, 84, 110, 136, 162 ], [ 6, 26, 54, 82, 110, 138, 166 ], [ 6, 30, 58, 86, 114, 142, 170 ] ],
G15: 1335,
G18: 7973,
G15_MASK: 21522,
getBCHTypeInfo: function(e) {
for (var t = e << 10; v.getBCHDigit(t) - v.getBCHDigit(v.G15) >= 0; ) t ^= v.G15 << v.getBCHDigit(t) - v.getBCHDigit(v.G15);
return (e << 10 | t) ^ v.G15_MASK;
},
getBCHTypeNumber: function(e) {
for (var t = e << 12; v.getBCHDigit(t) - v.getBCHDigit(v.G18) >= 0; ) t ^= v.G18 << v.getBCHDigit(t) - v.getBCHDigit(v.G18);
return e << 12 | t;
},
getBCHDigit: function(e) {
for (var t = 0; 0 != e; ) {
t++;
e >>>= 1;
}
return t;
},
getPatternPosition: function(e) {
return v.PATTERN_POSITION_TABLE[e - 1];
},
getMask: function(e, t, i) {
switch (e) {
case u:
return (t + i) % 2 == 0;

case h:
return t % 2 == 0;

case d:
return i % 3 == 0;

case g:
return (t + i) % 3 == 0;

case f:
return (Math.floor(t / 2) + Math.floor(i / 3)) % 2 == 0;

case p:
return t * i % 2 + t * i % 3 == 0;

case m:
return (t * i % 2 + t * i % 3) % 2 == 0;

case _:
return (t * i % 3 + (t + i) % 2) % 2 == 0;

default:
throw new Error("bad maskPattern:" + e);
}
},
getErrorCorrectPolynomial: function(e) {
for (var t = new I([ 1 ], 0), i = 0; i < e; i++) t = t.multiply(new I([ 1, y.gexp(i) ], 0));
return t;
},
getLengthInBits: function(e, t) {
if (1 <= t && t < 10) switch (e) {
case a.MODE_NUMBER:
return 10;

case a.MODE_ALPHA_NUM:
return 9;

case a.MODE_8BIT_BYTE:
case a.MODE_KANJI:
return 8;

default:
throw new Error("mode:" + e);
} else if (t < 27) switch (e) {
case a.MODE_NUMBER:
return 12;

case a.MODE_ALPHA_NUM:
return 11;

case a.MODE_8BIT_BYTE:
return 16;

case a.MODE_KANJI:
return 10;

default:
throw new Error("mode:" + e);
} else {
if (!(t < 41)) throw new Error("type:" + t);
switch (e) {
case a.MODE_NUMBER:
return 14;

case a.MODE_ALPHA_NUM:
return 13;

case a.MODE_8BIT_BYTE:
return 16;

case a.MODE_KANJI:
return 12;

default:
throw new Error("mode:" + e);
}
}
},
getLostPoint: function(e) {
for (var t = e.getModuleCount(), i = 0, n = 0; n < t; n++) for (var o = 0; o < t; o++) {
for (var a = 0, s = e.isDark(n, o), r = -1; r <= 1; r++) if (!(n + r < 0 || t <= n + r)) for (var c = -1; c <= 1; c++) o + c < 0 || t <= o + c || 0 == r && 0 == c || s == e.isDark(n + r, o + c) && a++;
a > 5 && (i += 3 + a - 5);
}
for (var l = 0; l < t - 1; l++) for (var u = 0; u < t - 1; u++) {
var h = 0;
e.isDark(l, u) && h++;
e.isDark(l + 1, u) && h++;
e.isDark(l, u + 1) && h++;
e.isDark(l + 1, u + 1) && h++;
0 != h && 4 != h || (i += 3);
}
for (var d = 0; d < t; d++) for (var g = 0; g < t - 6; g++) e.isDark(d, g) && !e.isDark(d, g + 1) && e.isDark(d, g + 2) && e.isDark(d, g + 3) && e.isDark(d, g + 4) && !e.isDark(d, g + 5) && e.isDark(d, g + 6) && (i += 40);
for (var f = 0; f < t; f++) for (var p = 0; p < t - 6; p++) e.isDark(p, f) && !e.isDark(p + 1, f) && e.isDark(p + 2, f) && e.isDark(p + 3, f) && e.isDark(p + 4, f) && !e.isDark(p + 5, f) && e.isDark(p + 6, f) && (i += 40);
for (var m = 0, _ = 0; _ < t; _++) for (var v = 0; v < t; v++) e.isDark(v, _) && m++;
return i += 10 * (Math.abs(100 * m / t / t - 50) / 5);
}
}, y = {
glog: function(e) {
if (e < 1) throw new Error("glog(" + e + ")");
return y.LOG_TABLE[e];
},
gexp: function(e) {
for (;e < 0; ) e += 255;
for (;e >= 256; ) e -= 255;
return y.EXP_TABLE[e];
},
EXP_TABLE: new Array(256),
LOG_TABLE: new Array(256)
}, D = 0; D < 8; D++) y.EXP_TABLE[D] = 1 << D;
for (var b = 8; b < 256; b++) y.EXP_TABLE[b] = y.EXP_TABLE[b - 4] ^ y.EXP_TABLE[b - 5] ^ y.EXP_TABLE[b - 6] ^ y.EXP_TABLE[b - 8];
for (var w = 0; w < 255; w++) y.LOG_TABLE[y.EXP_TABLE[w]] = w;
function I(e, t) {
if (void 0 == e.length) throw new Error(e.length + "/" + t);
for (var i = 0; i < e.length && 0 == e[i]; ) i++;
this.num = new Array(e.length - i + t);
for (var n = 0; n < e.length - i; n++) this.num[n] = e[n + i];
}
I.prototype = {
get: function(e) {
return this.num[e];
},
getLength: function() {
return this.num.length;
},
multiply: function(e) {
for (var t = new Array(this.getLength() + e.getLength() - 1), i = 0; i < this.getLength(); i++) for (var n = 0; n < e.getLength(); n++) t[i + n] ^= y.gexp(y.glog(this.get(i)) + y.glog(e.get(n)));
return new I(t, 0);
},
mod: function(e) {
if (this.getLength() - e.getLength() < 0) return this;
for (var t = y.glog(this.get(0)) - y.glog(e.get(0)), i = new Array(this.getLength()), n = 0; n < this.getLength(); n++) i[n] = this.get(n);
for (var o = 0; o < e.getLength(); o++) i[o] ^= y.gexp(y.glog(e.get(o)) + t);
return new I(i, 0).mod(e);
}
};
function T(e, t) {
this.totalCount = e;
this.dataCount = t;
}
T.RS_BLOCK_TABLE = [ [ 1, 26, 19 ], [ 1, 26, 16 ], [ 1, 26, 13 ], [ 1, 26, 9 ], [ 1, 44, 34 ], [ 1, 44, 28 ], [ 1, 44, 22 ], [ 1, 44, 16 ], [ 1, 70, 55 ], [ 1, 70, 44 ], [ 2, 35, 17 ], [ 2, 35, 13 ], [ 1, 100, 80 ], [ 2, 50, 32 ], [ 2, 50, 24 ], [ 4, 25, 9 ], [ 1, 134, 108 ], [ 2, 67, 43 ], [ 2, 33, 15, 2, 34, 16 ], [ 2, 33, 11, 2, 34, 12 ], [ 2, 86, 68 ], [ 4, 43, 27 ], [ 4, 43, 19 ], [ 4, 43, 15 ], [ 2, 98, 78 ], [ 4, 49, 31 ], [ 2, 32, 14, 4, 33, 15 ], [ 4, 39, 13, 1, 40, 14 ], [ 2, 121, 97 ], [ 2, 60, 38, 2, 61, 39 ], [ 4, 40, 18, 2, 41, 19 ], [ 4, 40, 14, 2, 41, 15 ], [ 2, 146, 116 ], [ 3, 58, 36, 2, 59, 37 ], [ 4, 36, 16, 4, 37, 17 ], [ 4, 36, 12, 4, 37, 13 ], [ 2, 86, 68, 2, 87, 69 ], [ 4, 69, 43, 1, 70, 44 ], [ 6, 43, 19, 2, 44, 20 ], [ 6, 43, 15, 2, 44, 16 ], [ 4, 101, 81 ], [ 1, 80, 50, 4, 81, 51 ], [ 4, 50, 22, 4, 51, 23 ], [ 3, 36, 12, 8, 37, 13 ], [ 2, 116, 92, 2, 117, 93 ], [ 6, 58, 36, 2, 59, 37 ], [ 4, 46, 20, 6, 47, 21 ], [ 7, 42, 14, 4, 43, 15 ], [ 4, 133, 107 ], [ 8, 59, 37, 1, 60, 38 ], [ 8, 44, 20, 4, 45, 21 ], [ 12, 33, 11, 4, 34, 12 ], [ 3, 145, 115, 1, 146, 116 ], [ 4, 64, 40, 5, 65, 41 ], [ 11, 36, 16, 5, 37, 17 ], [ 11, 36, 12, 5, 37, 13 ], [ 5, 109, 87, 1, 110, 88 ], [ 5, 65, 41, 5, 66, 42 ], [ 5, 54, 24, 7, 55, 25 ], [ 11, 36, 12 ], [ 5, 122, 98, 1, 123, 99 ], [ 7, 73, 45, 3, 74, 46 ], [ 15, 43, 19, 2, 44, 20 ], [ 3, 45, 15, 13, 46, 16 ], [ 1, 135, 107, 5, 136, 108 ], [ 10, 74, 46, 1, 75, 47 ], [ 1, 50, 22, 15, 51, 23 ], [ 2, 42, 14, 17, 43, 15 ], [ 5, 150, 120, 1, 151, 121 ], [ 9, 69, 43, 4, 70, 44 ], [ 17, 50, 22, 1, 51, 23 ], [ 2, 42, 14, 19, 43, 15 ], [ 3, 141, 113, 4, 142, 114 ], [ 3, 70, 44, 11, 71, 45 ], [ 17, 47, 21, 4, 48, 22 ], [ 9, 39, 13, 16, 40, 14 ], [ 3, 135, 107, 5, 136, 108 ], [ 3, 67, 41, 13, 68, 42 ], [ 15, 54, 24, 5, 55, 25 ], [ 15, 43, 15, 10, 44, 16 ], [ 4, 144, 116, 4, 145, 117 ], [ 17, 68, 42 ], [ 17, 50, 22, 6, 51, 23 ], [ 19, 46, 16, 6, 47, 17 ], [ 2, 139, 111, 7, 140, 112 ], [ 17, 74, 46 ], [ 7, 54, 24, 16, 55, 25 ], [ 34, 37, 13 ], [ 4, 151, 121, 5, 152, 122 ], [ 4, 75, 47, 14, 76, 48 ], [ 11, 54, 24, 14, 55, 25 ], [ 16, 45, 15, 14, 46, 16 ], [ 6, 147, 117, 4, 148, 118 ], [ 6, 73, 45, 14, 74, 46 ], [ 11, 54, 24, 16, 55, 25 ], [ 30, 46, 16, 2, 47, 17 ], [ 8, 132, 106, 4, 133, 107 ], [ 8, 75, 47, 13, 76, 48 ], [ 7, 54, 24, 22, 55, 25 ], [ 22, 45, 15, 13, 46, 16 ], [ 10, 142, 114, 2, 143, 115 ], [ 19, 74, 46, 4, 75, 47 ], [ 28, 50, 22, 6, 51, 23 ], [ 33, 46, 16, 4, 47, 17 ], [ 8, 152, 122, 4, 153, 123 ], [ 22, 73, 45, 3, 74, 46 ], [ 8, 53, 23, 26, 54, 24 ], [ 12, 45, 15, 28, 46, 16 ], [ 3, 147, 117, 10, 148, 118 ], [ 3, 73, 45, 23, 74, 46 ], [ 4, 54, 24, 31, 55, 25 ], [ 11, 45, 15, 31, 46, 16 ], [ 7, 146, 116, 7, 147, 117 ], [ 21, 73, 45, 7, 74, 46 ], [ 1, 53, 23, 37, 54, 24 ], [ 19, 45, 15, 26, 46, 16 ], [ 5, 145, 115, 10, 146, 116 ], [ 19, 75, 47, 10, 76, 48 ], [ 15, 54, 24, 25, 55, 25 ], [ 23, 45, 15, 25, 46, 16 ], [ 13, 145, 115, 3, 146, 116 ], [ 2, 74, 46, 29, 75, 47 ], [ 42, 54, 24, 1, 55, 25 ], [ 23, 45, 15, 28, 46, 16 ], [ 17, 145, 115 ], [ 10, 74, 46, 23, 75, 47 ], [ 10, 54, 24, 35, 55, 25 ], [ 19, 45, 15, 35, 46, 16 ], [ 17, 145, 115, 1, 146, 116 ], [ 14, 74, 46, 21, 75, 47 ], [ 29, 54, 24, 19, 55, 25 ], [ 11, 45, 15, 46, 46, 16 ], [ 13, 145, 115, 6, 146, 116 ], [ 14, 74, 46, 23, 75, 47 ], [ 44, 54, 24, 7, 55, 25 ], [ 59, 46, 16, 1, 47, 17 ], [ 12, 151, 121, 7, 152, 122 ], [ 12, 75, 47, 26, 76, 48 ], [ 39, 54, 24, 14, 55, 25 ], [ 22, 45, 15, 41, 46, 16 ], [ 6, 151, 121, 14, 152, 122 ], [ 6, 75, 47, 34, 76, 48 ], [ 46, 54, 24, 10, 55, 25 ], [ 2, 45, 15, 64, 46, 16 ], [ 17, 152, 122, 4, 153, 123 ], [ 29, 74, 46, 14, 75, 47 ], [ 49, 54, 24, 10, 55, 25 ], [ 24, 45, 15, 46, 46, 16 ], [ 4, 152, 122, 18, 153, 123 ], [ 13, 74, 46, 32, 75, 47 ], [ 48, 54, 24, 14, 55, 25 ], [ 42, 45, 15, 32, 46, 16 ], [ 20, 147, 117, 4, 148, 118 ], [ 40, 75, 47, 7, 76, 48 ], [ 43, 54, 24, 22, 55, 25 ], [ 10, 45, 15, 67, 46, 16 ], [ 19, 148, 118, 6, 149, 119 ], [ 18, 75, 47, 31, 76, 48 ], [ 34, 54, 24, 34, 55, 25 ], [ 20, 45, 15, 61, 46, 16 ] ];
T.getRSBlocks = function(e, t) {
var i = T.getRsBlockTable(e, t);
if (void 0 == i) throw new Error("bad rs block @ typeNumber:" + e + "/errorCorrectLevel:" + t);
for (var n = i.length / 3, o = new Array(), a = 0; a < n; a++) for (var s = i[3 * a + 0], r = i[3 * a + 1], c = i[3 * a + 2], l = 0; l < s; l++) o.push(new T(r, c));
return o;
};
T.getRsBlockTable = function(e, t) {
switch (t) {
case s:
return T.RS_BLOCK_TABLE[4 * (e - 1) + 0];

case r:
return T.RS_BLOCK_TABLE[4 * (e - 1) + 1];

case c:
return T.RS_BLOCK_TABLE[4 * (e - 1) + 2];

case l:
return T.RS_BLOCK_TABLE[4 * (e - 1) + 3];

default:
return;
}
};
function C() {
this.buffer = new Array();
this.length = 0;
}
C.prototype = {
get: function(e) {
var t = Math.floor(e / 8);
return 1 == (this.buffer[t] >>> 7 - e % 8 & 1);
},
put: function(e, t) {
for (var i = 0; i < t; i++) this.putBit(1 == (e >>> t - i - 1 & 1));
},
getLengthInBits: function() {
return this.length;
},
putBit: function(e) {
var t = Math.floor(this.length / 8);
this.buffer.length <= t && this.buffer.push(0);
e && (this.buffer[t] |= 128 >>> this.length % 8);
this.length++;
}
};
cc.Class({
extends: cc.Component,
editor: {
requireComponent: cc.Graphics,
executeInEditMode: !0
},
properties: {
string: {
default: "Hello World!",
notify: function(e) {
this.string !== e && this.setContent();
}
},
backColor: {
type: cc.Color,
default: cc.Color.WHITE,
notify: function() {
this.setContent();
}
},
foreColor: {
type: cc.Color,
default: cc.Color.BLACK,
notify: function(e) {
this.node.color = this.graphics.fillColor;
this.setContent();
}
},
margin: {
type: cc.Float,
default: 10,
notify: function(e) {
e !== this.margin && this.setContent();
}
},
_size: 200,
size: {
type: cc.Float,
get: function() {
return this._size;
},
set: function(e) {
if (this._size !== e) {
this.node.setContentSize(e, e);
this.setContent();
this._size = e;
}
}
}
},
onLoad: function() {
this.graphics = this.node.getComponent(cc.Graphics);
this.node.setContentSize(this.size, this.size);
this.setContent();
},
setContent: function() {
this.graphics.clear();
this.graphics.fillColor = this.backColor;
var e = this.node.width;
this.graphics.rect(0 - .5 * e, 0 - .5 * e, e, e);
this.graphics.fill();
this.graphics.close();
var t = new o(-1, 2);
t.addData(this.string);
t.make();
this.graphics.fillColor = this.foreColor;
for (var i = e - 2 * this.margin, n = t.getModuleCount(), a = i / n, s = i / n, r = Math.ceil(a), c = Math.ceil(s), l = 0; l < n; l++) for (var u = 0; u < n; u++) if (t.isDark(l, u)) {
this.graphics.rect(this.margin + u * a - .5 * e, i - s - Math.round(l * s) + this.margin - .5 * e, r, c);
this.graphics.fill();
}
}
});
cc._RF.pop();
}, {} ],
UICtrl: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "881d8wHahtN/ZLrr9tLOuvo", "UICtrl");
var n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
return typeof e;
} : function(e) {
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
};
window.UICtrl = {
uiList: [],
openingUI: {}
};
UICtrl.openUI = function(e, t) {
var i = this;
if (this.openingUI[e]) cc.warn("窗口正在打开中:" + e); else {
this.openingUI[e] = !0;
var n = function(i) {
var n = i.getComponent("baseNode");
t && t(n);
this.openingUI[e] = null;
}.bind(this);
cc.loader.loadRes("prefab/" + e, function(t, o) {
if (t) {
i.openingUI[e] = null;
cc.error(t.message || t);
} else {
var a = cc.instantiate(o), s = a.getComponent("baseNode");
if (s && s.getComponent("baseDlg")) {
var r = cc.find("LayerDlg", cc.Canvas.instance.node);
a.parent = r;
} else {
var c = cc.find("LayerNode", cc.Canvas.instance.node);
a.parent = c;
}
a.pathName = e;
UICtrl.uiList.push(a);
n(a);
}
});
}
};
UICtrl.createUI = function(e, t) {
cc.loader.loadRes(e, function(e, i) {
if (e) cc.error(e.message || e); else {
var n = cc.instantiate(i);
t(n);
}
});
};
UICtrl.closeUI = function(e) {
for (var t = UICtrl.uiList.length - 1; t >= 0; t--) {
var i = UICtrl.uiList[t];
if (i && (i.pathName === e || "object" == ("undefined" == typeof e ? "undefined" : n(e)) && i === e.node)) {
i.destroy();
UICtrl.uiList.splice(t, 1);
return;
}
}
console.log("UICtrl.closeUI fail not found ui " + e);
};
UICtrl.closeAllDlg = function(e) {
for (var t = UICtrl.uiList.length - 1; t >= 0; t--) {
var i = UICtrl.uiList[t];
if (!i || i.pathName !== e && ("object" != ("undefined" == typeof e ? "undefined" : n(e)) || i !== e.node)) {
var o = i.getComponent("baseDlg");
if (o && o.hide) {
console.log("[关闭所有窗口]", i.name);
i.destroy();
UICtrl.uiList.splice(t, 1);
}
}
}
};
UICtrl.findUI = function(e, t) {
for (var i = UICtrl.uiList.length - 1; i >= 0; i--) {
var n = UICtrl.uiList[i];
if (n && n.pathName === e) return "undefined" != typeof t ? n.getComponent("baseNode") : n;
}
};
UICtrl.clearUI = function(e) {
this.findUI(e) && this.closeUI(e);
};
cc._RF.pop();
}, {} ],
audioData: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "a94a1V5a6RAh6nvdq3NHwq5", "audioData");
var n = e("csvData"), o = cc.Enum({
Main: 1,
FAMILY: 2
}), a = cc.Class({
extends: n,
name: "audioData",
properties: {
_fileName: {
override: !0,
default: "video"
},
_clipBuffer: {
type: Map,
default: null
},
_playEffetTime: 0,
_StopAllSound: !1
},
ctor: function() {
this._clipBuffer = new Map();
},
switchMusic: function(e) {
gameData.set("gMusic", e);
1 == e ? this.playBGM() : this.stopBGM();
},
switchEffect: function(e) {
gameData.set("gEffect", e);
},
switchVibrate: function(e) {
gameData.set("gVibrate", e);
},
switchMainZone: function() {
this._InInstanceZones = o.Main;
cc.audioEngine.stopAllEffects();
this.playBGM();
},
switchFamilyZone: function() {
this._InInstanceZones = o.FAMILY;
cc.audioEngine.stopAllEffects();
this.stopBGM();
},
stopAllSound: function(e) {
this._StopAllSound = !0;
cc.audioEngine.stopAll();
this.stopBGM();
e && cc.game.pause();
},
resumeAllSound: function(e) {
this._StopAllSound = !1;
this.playBGM();
e && cc.game.resume();
},
playBGM: function() {
var e = this;
console.log("[音乐]播放");
if (0 != gameData.gMusic && this._InInstanceZones == o.Main) {
this.stopBGM();
var t = this._getPathByID(1);
cc.loader.loadRes(t, function(i, n) {
if (i) cc.error(i.message || i); else {
e._clipBuffer.set(t, n);
cc.audioEngine.playMusic(n, !0);
}
});
}
},
stopBGM: function() {
cc.audioEngine.stopMusic();
console.log("[音乐]关闭");
},
playSoundByID: function(e, t, i) {
var n = this._getPathByID(e);
this.playSoundByPath(n, !0, i);
},
perLoadSoundByID: function(e) {
var t = this, i = this._getPathByID(e);
this._clipBuffer.get(i) || cc.loader.loadRes(i, cc.AudioClip, function(e, n) {
e ? cc.error(e.message || e) : t._clipBuffer.set(i, n);
});
},
playSoundByPath: function(e, t, i) {
var n = this;
if (e && !this._StopAllSound && 0 != gameData.gEffect) {
var a = Date.now();
if ((t || !(a - this._playEffetTime < 200)) && (this._InInstanceZones != o.FAMILY || i && i == o.FAMILY)) {
this._playEffetTime = a;
var s = this._clipBuffer.get(e);
cc.isValid(s) ? cc.audioEngine.playEffect(s, !1) : cc.loader.loadRes(e, cc.AudioClip, function(t, i) {
if (t) cc.error(t.message || t); else {
n._clipBuffer.set(e, i);
cc.audioEngine.playEffect(i, !1);
}
});
}
}
},
_getPathByID: function(e) {
var t = null;
try {
t = this.getValueByIDKey(e, "link");
} catch (e) {}
if (t) {
t.indexOf(".") > 0 && (t = t.substr(0, t.indexOf(".")));
return "audio/" + (t = t.replace(/\\/g, "/"));
}
cc.warn("声音未找到id = " + e);
}
});
window.audioData = new a();
cc._RF.pop();
}, {
csvData: "csvData"
} ],
baseAdData: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "ac20a6rONhAsYKXxnVRc35y", "baseAdData");
var n;
function o(e, t, i) {
t in e ? Object.defineProperty(e, t, {
value: i,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = i;
return e;
}
var a = cc.Enum({
FEED: 1,
BANNER: 2,
INTERACTION: 3,
FULL_VIDEO: 4,
SPLASH: 5,
REWARD_VIDEO: 6,
DRAW_FEED: 7
}), s = {};
cc.Class({
extends: e("baseData"),
properties: (n = {
app_name: "",
app_icon: "",
app_title: "",
position_type: ""
}, o(n, "app_name", ""), o(n, "position_id", ""), o(n, "material_url", ""), o(n, "click_url", ""), 
o(n, "request_uuid", ""), o(n, "app_packname", ""), o(n, "HTTPTimeout", 5e3), o(n, "maxFailTime", 2), 
o(n, "fileList", {
default: {}
}), n),
bIsVideoAd: function() {
return this.position_type == a.FULL_VIDEO || this.position_type == a.REWARD_VIDEO;
},
setAdDatas: function(e) {
if ("ok" == e.code) {
if (e.data) for (var t in e.data) {
this[t] || "" == this[t] || LWADSDK.log("[警告]广告数据未定义 " + t);
this.set(t, e.data[t]);
}
} else LWADSDK.log("setAdDatas 返回失败" + e.code);
},
getAdConfig: function(e, t) {
if (this.position_id) {
var i = lwAdConfig.server_url_get_res;
this.GET(i, {
position_id: this.position_id,
app_secret: lwAdConfig.app_secret,
timestamp: this.getNow()
}, function(i) {
i && "ok" == i.code ? e && e(i) : t && t(i);
}, function() {
t && t();
});
} else LWADSDK.log("获取广告素材失败 广告id 为空");
},
sendMarkWatch: function() {
this._sendMark("watch");
},
sendMarkClick: function() {
this._sendMark("click");
},
perloadVideo: function() {
if (this.bIsVideoAd()) {
var e = this.material_url;
if (cc.isValid(s[e])) return;
this.downloadFile(e, function(t) {
LWADSDK.log("视频预下载成功" + e);
cc.loader.load({
url: t,
type: "mp4"
}, function(t, i) {
if (t) {
LWADSDK.log("视频加载失败" + e);
LWADSDK.log(t);
} else {
LWADSDK.log("视频预加载成功" + e);
s[e] = i;
}
});
});
}
},
downloadFile: function(e, t, i) {
0;
this._downloadItems = this._downloadItems || {};
this._downloadItems[e] = {};
var n = this._downloadItems[e], o = jsb.fileUtils.getWritablePath() + e.match(/[^\/]+\.[^\.]*/);
if (!n.downloader) {
n.downloader = new jsb.Downloader();
n.downloader.setOnFileTaskSuccess(function() {
setTimeout(function() {
t && t(o);
}, .1);
});
n.downloader.setOnTaskProgress(function(e, t, i, n) {});
n.downloader.setOnTaskError(function() {
i && i();
});
}
n.downloader.createDownloadFileTask(e, o, "");
},
getVideoClip: function() {
var e = this.material_url;
if (e && cc.isValid(s[e])) return s[e];
},
_sendMark: function(e) {
if (this.position_id) {
var t = lwAdConfig.server_url_mark_res;
this.GET(t, {
request_uuid: this.request_uuid,
type: e,
timestamp: this.getNow()
}, function(e) {}, function() {});
} else LWADSDK.log("广告打点失败 广告id 为空");
},
GET: function(e, t, i, n) {
var o = {};
Object.keys(t).sort().forEach(function(e) {
o[e] = t[e];
});
t = o;
this.maxFailTime = window.HTTPS_TIMES || this.maxFailTime;
if ("string" == typeof e) {
var a = e + "?", s = !1;
LWADSDK.log(e + JSON.stringify(t));
var r = this.encodeTab(t);
a += r;
var c = lwAdConfig.app_api;
a += "&" + this.encodeTab({
sign: MD5(r + c)
});
var l = !1, u = function(o) {
if (!l) {
l = !0;
this.fileList[a] || (this.fileList[a] = 0);
this.fileList[a]++;
if (this.fileList[a] >= this.maxFailTime) {
if (n && !s) {
s = !0;
n(o);
}
this.fileList[a] = 0;
} else this.GET(e, t, i, n);
}
}.bind(this), h = function() {
l = !0;
this.fileList[a] = 0;
}.bind(this), d = new Date().Format("m:s.S");
LWADSDK.log(d + ":get:", a);
var g = cc.loader.getXMLHttpRequest();
g.onreadystatechange = function() {
if (4 === g.readyState) if (g.status >= 200 && g.status < 300) {
if (i) {
var e = g.response;
LWADSDK.log("http rev:", e);
try {
t = e && JSON.parse(e);
} catch (e) {
u({
message: "服务器返回出错",
code: "notNet"
});
}
t && i(t);
}
h();
} else {
e = g.response;
LWADSDK.log("rev fail:", e);
var t = {};
try {
t = e && JSON.parse(e);
} catch (e) {
t = {
message: "服务器返回内容出错",
code: "notNet"
};
}
u(t);
LWADSDK.log("rev error:", a, g.readyState, g.status);
}
};
g.onerror = function(e) {
LWADSDK.log("[连接失败]");
LWADSDK.log(e);
u();
};
g.open("GET", a, !0);
g.timeout = this.HTTPTimeout;
g.send();
cc.sys.isNative && setTimeout(function() {
!l && u();
}, this.HTTPTimeout);
} else cc.error("url mush be a string", e);
},
encodeTab: function(e) {
var t = "";
for (var i in e) null !== e[i] && void 0 !== e[i] && (t = t + i + "=" + this.urlencode(e[i]) + "&");
return t = t.slice(0, -1);
},
concatTab: function(e) {
var t = "";
for (var i in e) t = t + i + "=" + e[i] + "&";
return t = t.slice(0, -1);
},
urlencode: function(e) {
e = (e + "").toString();
return encodeURIComponent(e).replace(/!/g, "%21").replace(/'/g, "%27").replace(/\(/g, "%28").replace(/\)/g, "%29").replace(/\*/g, "%2A").replace(/%20/g, "+");
},
getNow: function() {
return new Date().getTime();
}
});
cc._RF.pop();
}, {
baseData: "baseData"
} ],
baseData: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "1d8bagyUetAkqB59LrAylDu", "baseData");
var n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
return typeof e;
} : function(e) {
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
}, o = "", a = (Date.now(), 0);
cc.Class({
properties: {
_eventHandlers: {
default: {}
},
_serverData: {
default: {}
},
_dataTime: null,
_serverTime: void 0,
_hasInitServer: !0,
_hasChangeData: !0,
_classIndex: 0,
_dataEvent: void 0,
_debugDay: void 0,
__fireAll: !1,
_importantKey: void 0
},
ctor: function() {
this._classIndex = a++;
this._dataEvent = new cc.EventTarget();
},
_getDay: function() {
return this._debugDay || Math.floor(Date.now() / 24 / 3600 / 1e3);
},
release: function() {
this._dataEvent && this._dataEvent.removeAll();
this._dataEvent = null;
for (var e in this._eventHandlers) if (this._eventHandlers[e]) {
for (var t in this._eventHandlers[e]) {
var i = this._eventHandlers[e][t];
i && i.off(e);
}
delete this._eventHandlers[e];
}
},
setSaveKey: function(e) {
o = e;
},
getSaveKey: function() {
return o;
},
saveAllData: function() {
cc.game.emit("_saveAllKey");
},
delAllData: function(e) {
cc.game.emit("_delAllKey", e);
},
clearAllData: function() {
cc.game.emit("_clearAllKey");
},
set: function(e, t, i) {
t = i ? i(t) : t;
if (!this.__fireAll && this[e] === t && "object" != ("undefined" == typeof t ? "undefined" : n(t))) return t;
var o = this[e];
this[e] = t;
this.onKeyChange(e, t, o);
return t;
},
send: function(e, t, i) {
var n = t || 0;
n = i ? i(n) : n;
this[e] = n;
this.onKeyChange(e, n, void 0);
},
onKeyChange: function(e, t, i) {
var n = this.__cid__ + this._classIndex + e;
if (this._eventHandlers[n]) for (var o in this._eventHandlers[n]) {
var a = this._eventHandlers[n][o];
a && a.emit(n, t, i);
}
this._dataEvent && this._dataEvent.emit(n, t, i);
},
add: function(e, t) {
return this.plus(e, t);
},
sets: function(e) {
for (var t in e) this.set(t, e[t]);
},
setWithKey: function(e, t, i, o) {
if (o) if (void 0 != n(this[t]) && void 0 != n(this[t][i]) && void 0 != n(this[t][i][o])) {
this[t][i][o] = e;
this.set(t, this[t]);
} else cc.warn(t + "-" + i + "-" + o + "不存在"); else if (i) if (void 0 != n(this[t]) && void 0 != n(this[t][i])) {
this[t][i] = e;
this.set(t, this[t]);
} else cc.warn(t + "-" + i + "不存在"); else this.set(t, e);
},
getWithKey: function(e, t, i) {
if (i) {
if (void 0 != n(this[e]) && void 0 != n(this[e][t])) return this[e][t][i];
cc.warn(e + "-" + t + "不存在");
} else {
if (!t) return this[key];
if (void 0 != n(this[e])) return this[e][t];
cc.warn(e + "不存在");
}
},
get: function(e) {
return this[e];
},
getAll: function() {
return this;
},
plus: function(e, t) {
var i = Number(this.get(e)), n = Number(t);
i || (i = 0);
n || (n = 0);
var o = i + n;
this.set(e, o);
return o;
},
once: function(e, t, i) {
if ("function" == typeof t) if (i) {
i = i.node || i;
var n = this.__cid__ + this._classIndex + e;
i.once(n, t, i);
this._eventHandlers[n] = this._eventHandlers[n] || [];
var o = !1;
for (var a in this._eventHandlers[n]) if (i == this._eventHandlers[n][a]) {
o = !0;
break;
}
o || this._eventHandlers[n].push(i);
} else this._dataEvent && this._dataEvent.once(this.__cid__ + this._classIndex + e, t);
},
on: function(e, t, i) {
if ("function" == typeof t) {
this.onChange(e, t, i);
var n = this.get(e);
void 0 !== n && t(n);
}
},
onChange: function(e, t, i) {
if ("function" == typeof t) if (i) {
i = i.node || i;
var n = this.__cid__ + this._classIndex + e;
i.on(n, t, i);
this._eventHandlers[n] = this._eventHandlers[n] || [];
var o = !1;
for (var a in this._eventHandlers[n]) if (i == this._eventHandlers[n][a]) {
o = !0;
break;
}
o || this._eventHandlers[n].push(i);
} else this._dataEvent && this._dataEvent.on(this.__cid__ + this._classIndex + e, t);
},
off: function(e, t, i) {
if (i) {
i = i.node || i;
t ? i.off(this.__cid__ + this._classIndex + e, t, i) : i.targetOff(this.__cid__ + this._classIndex + e);
} else this._dataEvent && this._dataEvent.off(this.__cid__ + this._classIndex + e, t);
},
undefinedOrSet: function(e, t, i) {
util.isNull(this.get(e)) && this.set(e, t, i);
},
save: function(e) {
if (this.__cid__ && "" != this.__cid__) {
try {
var t = this.get(e);
null === t || void 0 === t || "undefined" === t || "null" === t ? cc.sys.localStorage.removeItem(o + this.__cid__ + e) : cc.sys.localStorage.setItem(o + this.__cid__ + e, JSON.stringify(t));
} catch (e) {
console.log("保存游戏数据失败");
}
return t;
}
console.error("必须要有类名才能保存值");
},
read: function(e, t) {
if (this.__cid__ && "" != this.__cid__) {
var i;
if ("" !== (i = cc.sys.localStorage.getItem(o + this.__cid__ + e)) && void 0 !== i) try {
null !== (i = JSON.parse(i)) && void 0 !== i || (i = t);
} catch (t) {
console.error(e + " " + i);
console.error(t);
} else i = void 0;
return i;
}
console.error("必须要有类名才能保存值");
},
del: function(e, t) {
cc.sys.localStorage.removeItem((t || o) + this.__cid__ + e);
},
autoReadSave: function(e, t) {
var i = this;
this.autoKey = this.autoKey || {};
var n = !0, o = this.read(e);
if (void 0 !== o) this.set(e, o); else {
void 0 != t && this.set(e, t);
n = null;
}
if (!this.autoKey[e]) {
this.autoKey[e] = !0;
this.on(e, function(t) {
if (n) n = null; else {
this.save(e);
this.autoKey[e] && "_dataTime" != e && "_serverTime" != e && (this._hasChangeData = !0);
}
}.bind(this));
cc.game.on(cc.game.EVENT_HIDE, function() {
i.save(e);
});
cc.game.on("_saveAllKey", function() {
i.save(e);
});
cc.game.on("_delAllKey", function(t) {
i.del(e, t);
});
cc.game.on("_clearAllKey", function(t) {
i.set(e, void 0);
});
return o;
}
},
getIsAutoSave: function(e) {
return this.autoKey && this.autoKey[e];
},
storeValue: function(e) {
try {
var t = this.get(e);
t = JSON.stringify(t);
cc.sys.localStorage.setItem(e, t);
} catch (e) {
console.log("保存游戏数据失败");
}
},
readValue: function(e) {
var t = cc.sys.localStorage.getItem(e);
try {
t = JSON.parse(t);
} catch (e) {}
return t;
},
removeValue: function(e) {
cc.sys.localStorage.removeItem(e);
}
});
cc._RF.pop();
}, {} ],
baseDlg: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "70df0k7QnRJ0ZbrfqR5xIks", "baseDlg");
var n = e("baseNode");
cc.Class({
extends: n,
properties: {
hasMask: {
default: !0,
tooltip: "是否有蒙版层"
},
maskOpacity: {
type: cc.Integer,
default: 220,
tooltip: "蒙版透明度",
range: [ 0, 255, 1 ],
slide: !0
},
ifTouchClose: {
default: !1,
tooltip: "是否点击关闭界面，需要勾选hasMask有蒙版才会生效"
},
playScale: {
default: !0,
tooltip: "是否播放窗口放大效果"
}
},
onLoad: function() {
var e = this;
n.prototype.onLoad.call(this);
if (this.hasMask) {
cc.loader.loadRes("prefab/uiTip/uiBg", function(t, i) {
if (!t) {
var n = cc.instantiate(i);
n.lwMaskName = "uiBg";
n.zIndex = -1;
n.parent = e.node;
n.opacity = e.maskOpacity;
e._sp_bg = n;
e.ifTouchClose && n.on(cc.Node.EventType.TOUCH_START, function(t) {
var i = t.target.convertToNodeSpaceAR(t.touch.getLocation()), n = e.node.anchorX, o = e.node.anchorY, a = e.node.width, s = e.node.height, r = -a * n, c = a * (1 - n), l = -s * o, u = s * (1 - o);
if (i.x >= r && i.x <= c && i.y >= l && i.y <= u) ; else {
console.log("[点在窗口外面");
e.closeSelf();
}
}, e);
}
});
this.playScale && this.playScaleAni();
}
},
closeSelf: function() {
UICtrl.closeUI(this);
},
playScaleAni: function() {
for (var e = this.node.children, t = 0; t < e.length; t++) if ("uiBg" != e[t].lwMaskName) {
var i = e[t].scale, n = cc.scaleTo(.005, .5), o = cc.scaleTo(.13, i + .05), a = cc.scaleTo(.13, i), s = cc.scaleTo(.08, i + .02), r = cc.scaleTo(.08, i), c = void 0;
(c = cc.sequence(cc.hide(), n, cc.show(), o, a, s, r)).easing(cc.easeOut(1));
e[t].runAction(c);
}
}
});
cc._RF.pop();
}, {
baseNode: "baseNode"
} ],
baseLayer: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "b149djKz39A8rSd16yLSe9M", "baseLayer");
cc.Class({
extends: cc.Component,
properties: {},
__preload: function() {
var e = function(t, i) {
for (var n = t.children, o = 0; o < n.length; o++) {
var a = n[o].name;
if (a) {
var s = a;
i[s] = n[o];
this[s] = n[o];
}
n[o].childrenCount > 0 && e(n[o], i);
}
}.bind(this);
e(this.node, this.node);
}
});
cc._RF.pop();
}, {} ],
baseNode: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "35af8wyZzZBfI0aKfSe+zc2", "baseNode");
cc.Class({
extends: cc.Component,
properties: {},
onLoad: function() {
var e = function(t, i, n) {
var o = t.children;
n = n || t.getComponent(cc.Button) || t.canTouch;
for (var a = 0; a < o.length; a++) {
var s = o[a].name;
if (s && s.indexOf("_") > 0) {
var r = s;
i[r];
i[r] = o[a];
this[r] = o[a];
}
o[a].childrenCount > 0 && e(o[a], i, n);
}
}.bind(this);
e(this.node, this.node);
this.addComponent(cc.BlockInputEvents);
},
show: function(e) {
this.__showing__ = !0;
this.__arg__ = e;
for (var t = this.node.parent.children, i = 0, n = 0; n < t.length; n++) {
var o = t[n].zIndex;
o = o >= 1e3 ? o - 1e3 : o;
i = Math.max(i, o);
}
this.node.zIndex = i + (this.froceTop ? 1e3 : 1);
this.playScale && this.playScaleAni();
},
hide: function() {
this.node.zIndex = 0;
},
lateUpdate: function(e) {
if (this.__showing__ && this.onEnter) {
this.__showing__ = !1;
this.onEnter(this.__arg__);
this.__arg__ = null;
}
if (this.callfuns) {
var t = this.callfuns.shift();
t && t(e);
}
},
delayCall: function(e) {
this.callfuns || (this.callfuns = []);
this.callfuns.push(e);
},
removeAllDelayCall: function() {
this.callfuns = [];
}
});
cc._RF.pop();
}, {} ],
bulletCsvData: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "7ae4cSQRD5Jj5BweV6ezdwN", "bulletCsvData");
var n = e("csvData"), o = cc.Class({
extends: n,
name: "bulletCsvData",
properties: {
_fileName: {
override: !0,
default: "bullet"
}
},
getBulletType: function(e) {
return this.getValueByIDKey(e, "bType");
}
});
window.bulletCsvData = new o();
cc._RF.pop();
}, {
csvData: "csvData"
} ],
captureNode: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "8d91a7r5TxGqYIdZJAiC11D", "captureNode");
cc.Class({
extends: cc.Component,
properties: {},
start: function() {},
cut: function(e) {
var t = this.node.getComponent(cc.Camera);
cc.isValid(t) || ((t = this.node.addComponent(cc.Camera)).enabled = !1);
t.cullingMask = 4294967295;
var i = this.node.__texture;
if (!cc.isValid(i)) {
var n = e || 1, o = Math.floor(this.node.getContentSize().width), a = Math.floor(this.node.getContentSize().height);
if (0 == o || 0 == a) {
console.error("分享的节点尺寸不能为0,需要为图片的尺寸");
return;
}
console.log("截图节点尺寸width:" + o + "height:" + a);
var s = cc.size(o * n, a * n);
cc.v2(0, 0);
t.zoomRatio = n;
i = new cc.RenderTexture();
this.node.__texture = i;
i.initWithSize(s.width, s.height);
t.targetTexture = i;
}
t.render(this.node);
var r = i.readPixels(), c = i.width, l = i.height;
console.log("-------texture------", c, l);
var u = this.filpYImage(r, c, l);
0;
var h = jsb.fileUtils.getWritablePath() + "render.png";
cc.sys.os == cc.sys.OS_IOS && (h = jsb.fileUtils.getWritablePath() + "render.png");
if (jsb.saveImageData(u, c, l, h)) {
console.log("save image data success, file: " + h);
return h;
}
console.error("save image data failed!");
},
filpYImage: function(e, t, i) {
for (var n = new Uint8Array(t * i * 4), o = 4 * t, a = 0; a < i; a++) for (var s = (i - 1 - a) * t * 4, r = a * t * 4, c = 0; c < o; c++) n[r + c] = e[s + c];
return n;
}
});
cc._RF.pop();
}, {} ],
cdMoneyCsvData: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "86eaaIKowZPiIsXKKD78KZw", "cdMoneyCsvData");
var n = e("csvData"), o = cc.Class({
extends: n,
properties: {
_fileName: {
override: !0,
default: "CD_honbao"
}
}
});
window.cdMoneyCsvData = new o();
cc._RF.pop();
}, {
csvData: "csvData"
} ],
configCsvData: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "a3144W7LRZEDqITZg8x66UB", "configCsvData");
var n = e("csvData"), o = cc.Class({
extends: n,
name: "configCsvData",
properties: {
_fileName: {
override: !0,
default: "config"
}
},
onLoadCSV: function() {
var e = this.getAllDatas();
this.cFreeTower = parseInt(e[1].parm1);
this.cRequireMoney = parseInt(e[4].parm1);
this.cMaxCombineBegin = parseInt(e[5].parm1);
this.cMaxCombineEnd = parseInt(e[6].parm1);
this.cMaxCombineAdd = [ parseInt(e[7].parm1), parseInt(e[7].parm2) ];
this.cMaxCombineMoney = parseInt(e[8].parm1);
this.cOtherGameMoney = parseInt(e[9].parm1);
this.cDamageLimit = [ parseInt(e[11].parm1), parseInt(e[11].parm2) ];
this.cFreeTowerMax = parseInt(e[12].parm1);
}
});
window.configCsvData = new o();
cc._RF.pop();
}, {
csvData: "csvData"
} ],
csvData: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "62425+8SQdHB4LoyI6FzF5Z", "csvData");
function n(e) {
return function() {
var t = e.apply(this, arguments);
return new Promise(function(e, i) {
return function n(o, a) {
try {
var s = t[o](a), r = s.value;
} catch (e) {
i(e);
return;
}
if (!s.done) return Promise.resolve(r).then(function(e) {
n("next", e);
}, function(e) {
n("throw", e);
});
e(r);
}("next");
});
};
}
var o = e("runtime"), a = {}, s = e("baseData");
cc.Class({
extends: s,
properties: {
_fileName: void 0,
_csvData: void 0
},
ctor: function() {
var e = this;
this._fileName ? setTimeout(function() {
e.loadCSV();
}, 300) : console.error("mush define a csv path");
},
onLoadCSV: function() {},
loadResNow: function(e) {
return new Promise(function(t, i) {
cc.loader.loadRes(e, function(e, i) {
t({
e: e,
v: i
});
});
});
},
loadCSV: function() {
var e = n(o.mark(function e(t) {
var i, n, s, r, c, l, u, h, d, g, f, p, m, _, v, y;
return o.wrap(function(e) {
for (;;) switch (e.prev = e.next) {
case 0:
if (!a[this._fileName]) {
e.next = 3;
break;
}
t && t();
return e.abrupt("return");

case 3:
i = 5;
n = "csvtable/" + this._fileName;
s = {};
e.next = 8;
return this.loadResNow(n);

case 8:
r = e.sent;
if (!(c = r.e)) {
e.next = 13;
break;
}
console.error(c);
return e.abrupt("return");

case 13:
(l = r.v).text = l.text.replace(/[\r]/g, "");
u = l.text.split("\n");
h = u[1].split(",");
d = u[2].split(",");
g = i;

case 19:
if (!(g < u.length)) {
e.next = 28;
break;
}
if ((f = u[g].split(",")).length == h.length && "" != f[0]) {
e.next = 23;
break;
}
return e.abrupt("continue", 25);

case 23:
s[g - i] = {};
for (p = 0; p < f.length; p++) {
m = f[p];
if ("int" == d[p]) {
f[p].indexOf("+") > 0 && console.error("load csv error file = " + this._fileName);
m = parseInt(f[p]);
}
"float" == d[p] && (m = parseFloat(f[p]));
void 0 != h[p] && (s[g - i][h[p].replace(/\s+/g, "")] = m);
}

case 25:
g++;
e.next = 19;
break;

case 28:
a[this._fileName] = {};
e.t0 = o.keys(s);

case 30:
if ((e.t1 = e.t0()).done) {
e.next = 40;
break;
}
_ = e.t1.value;
v = s[_];
if (void 0 !== (y = v.id || v.ID)) {
e.next = 37;
break;
}
console.error(n + " 表配置不规范,没有id");
return e.abrupt("continue", 30);

case 37:
a[this._fileName][y] = v;
e.next = 30;
break;

case 40:
t && t();
this.onLoadCSV && this.onLoadCSV();

case 42:
case "end":
return e.stop();
}
}, e, this);
}));
return function(t) {
return e.apply(this, arguments);
};
}(),
getAllDatas: function() {
a[this._fileName] || console.error("not found data", this._fileName);
return a[this._fileName];
},
getIDs: function() {
var e = this.getAllDatas();
return Object.keys(e);
},
getInfoByID: function(e) {
e = parseInt(e);
a[this._fileName] || console.error("not found data", this._fileName);
return a[this._fileName][e];
},
getValueByIDKey: function(e, t) {
var i = this.getInfoByID(e);
i || console.error("not found data id = " + e);
var n = i[t];
void 0 === n && console.error("not found value id = " + e + "key = " + t);
return n;
},
getIDByKeyValue: function(e, t) {
var i = this.getAllDatas();
for (var n in i) if (this.getValueByIDKey(n, e) === t) return n;
}
});
cc._RF.pop();
}, {
baseData: "baseData",
runtime: "runtime"
} ],
dividendCsvData: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "0ca03WXGh5GCL2gZLHuA73U", "dividendCsvData");
var n = e("csvData"), o = cc.Class({
extends: n,
name: "dividendCsvData",
properties: {
_fileName: {
override: !0,
default: "fenhon"
}
},
addProcess: function(e) {
if (!(4 == e && gameData.gDayVideoCount > 50)) {
if (3 == e) {
if (gameData.gDayCombineTime % 10 != 0) return;
if (gameData.gDayCombineTime > 50) return;
}
var t = this.getDivdendByID(e);
gameData.gDividend > 8500 && (t /= 100);
var i = Number(gameData.gDividend) + t;
i *= 10;
i = Number(i).toFixed(2);
gameData.set("gDividend", i);
console.log("[增加分红进度]", e, t, gameData.gDividend);
}
},
getDivdendByID: function(e) {
return parseInt(this.getValueByIDKey(e, "num"));
}
});
window.dividendCsvData = new o();
cc._RF.pop();
}, {
csvData: "csvData"
} ],
drawQRCode: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "2303aZat8RJT49zGf/RuB0o", "drawQRCode");
cc.Class({
extends: cc.Component,
properties: {},
onLoad: function() {
this.getComponent(cc.Sprite) && this.removeComponent(cc.Sprite);
this.getComponent(cc.Graphics) || this.addComponent(cc.Graphics);
},
draw: function(e) {
console.log("绘制二维码", e);
var t = new QRCode(-1, QRErrorCorrectLevel.H);
t.addData(e);
t.make();
for (var i = this.node.getComponent(cc.Graphics), n = this.node.width / t.getModuleCount(), o = this.node.height / t.getModuleCount(), a = 0; a < t.getModuleCount(); a++) for (var s = 0; s < t.getModuleCount(); s++) {
t.isDark(a, s) ? i.fillColor = cc.Color.BLACK : i.fillColor = cc.Color.WHITE;
var r = Math.ceil((s + 1) * n) - Math.floor(s * n), c = Math.ceil((a + 1) * n) - Math.floor(a * n);
i.rect(Math.round(s * n), Math.round(a * o), r, c);
i.fill();
}
this.node.x = this.node.x - this.node.width / 2;
this.node.y = this.node.y - this.node.height / 2;
}
});
cc._RF.pop();
}, {} ],
dropBoxCsvData: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "a2955Y9KHRE2IqwFAFGyDGC", "dropBoxCsvData");
var n = e("csvData"), o = cc.Class({
extends: n,
properties: {
_fileName: {
override: !0,
default: "airdrop"
}
}
});
window.dropBoxCsvData = new o();
cc._RF.pop();
}, {
csvData: "csvData"
} ],
familyLevelCsvData: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "92b65NHex9EVKjjeC9P00U7", "familyLevelCsvData");
var n = e("csvData"), o = cc.Class({
extends: n,
properties: {
_fileName: {
override: !0,
default: "family_level"
}
},
getCurrSonNumber: function(e, t) {
var i = this.getAllDatas();
for (var n in i) {
var o = i[n];
parseInt(o.id) < t && (e = parseInt(e) - parseInt(o.exp));
}
return e;
},
getMaxByLevel: function(e) {
return parseInt(this.getValueByIDKey(e, "exp"));
}
});
window.familyLevelCsvData = new o();
cc._RF.pop();
}, {
csvData: "csvData"
} ],
familySettingCsvData: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "ae3d24KoD9Ko5oDvNB0Fyun", "familySettingCsvData");
var n = e("csvData"), o = cc.Class({
extends: n,
properties: {
_fileName: {
override: !0,
default: "family_setting"
}
},
getTimeByLevel: function(e) {
var t = this.getInfoByID(1);
return 0 == e ? t.data1 : 1 == e ? t.data2 : 2 == e ? t.data3 : 3 == e ? t.data4 : 4 == e ? t.data5 : t.data1;
}
});
window.familySettingCsvData = new o();
cc._RF.pop();
}, {
csvData: "csvData"
} ],
familyTimesCsvData: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "9fbfe5t5Z5Hs6jHswGFbGpl", "familyTimesCsvData");
var n = e("csvData"), o = cc.Class({
extends: n,
properties: {
_fileName: {
override: !0,
default: "family_times"
}
},
getMoneyByTimeIndex: function(e, t) {
var i = this.getInfoByID(e);
return 0 == t ? i.money1 : 1 == t ? i.money2 : 2 == t ? i.money3 : 3 == t ? i.money4 : 4 == t ? i.money5 : i.money1;
}
});
window.familyTimesCsvData = new o();
cc._RF.pop();
}, {
csvData: "csvData"
} ],
gBuffMgr: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "bfcf08Vf4BPoZj3EdjbpznA", "gBuffMgr");
var n = cc.Class({
extends: cc.Component,
properties: {
_shopAtkUP: 0,
_shopCritUP: 0,
_inSpdUPBuff: !1,
_inMoveDownBuff: !1,
_inGoldUPCD: !1,
_inAtkFarBuff: !1
}
});
window.gBuffMgr = new n();
cc._RF.pop();
}, {} ],
gBulletMgr: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "385fbkpw7xKWJ3TO3Jm2Dc9", "gBulletMgr");
var n = cc.Class({
extends: cc.Component,
properties: {},
init: function() {
this.scheduleAndClear();
},
scheduleAndClear: function() {
var e = this;
this.schedule(function() {
e.mEffectCount = {};
}, G_COM.EFFECT_CLEAR_TIME);
},
ifCanPlayEndEffect: function(e) {
this.mEffectCount[e] || (this.mEffectCount[e] = 0);
this.mEffectCount[e] += 1;
return !(this.mEffectCount[e] > G_COM.EFFECT_TIME_MAX);
},
createBullet: function(e, t, i, n) {
var o = bulletCsvData.getInfoByID(e);
o.bType == G_BULLET.STR ? UICtrl.createUI("prefab/uiObjects/uiBulletStraight", function(a) {
a.parent = G_NODE.HALL.layer_bullet;
a.getComponent("uiBulletStraight").initWithTarget(o, t, i, n, e);
}) : o.bType == G_BULLET.LIGHT ? UICtrl.createUI("prefab/uiObjects/uiBulletLight", function(a) {
a.parent = G_NODE.HALL.layer_bullet;
a.getComponent("uiBulletLight").initWithTarget(o, t, i, n, e);
}) : o.bType == G_BULLET.LASER ? UICtrl.createUI("prefab/uiObjects/uiBulletLaser", function(a) {
a.parent = G_NODE.HALL.layer_bullet;
a.getComponent("uiBulletLaser").initWithTarget(o, t, i, n, e);
}) : o.bType == G_BULLET.MISSILE ? UICtrl.createUI("prefab/uiObjects/uiBulletMissile", function(a) {
a.parent = G_NODE.HALL.layer_bullet;
a.getComponent("uiBulletMissile").initWithTarget(o, t, i, n, e);
}) : o.bType == G_BULLET.GATLIN ? UICtrl.createUI("prefab/uiObjects/uiBulletStraight", function(a) {
a.parent = G_NODE.HALL.layer_bullet;
a.getComponent("uiBulletStraight").initWithTarget(o, t, i, n, e);
}) : o.bType == G_BULLET.RING ? UICtrl.createUI("prefab/uiObjects/uiBulletStraight", function(a) {
a.parent = G_NODE.HALL.layer_bullet;
a.getComponent("uiBulletStraight").initWithTarget(o, t, i, n, e);
}) : o.bType == G_BULLET.BLOCK && UICtrl.createUI("prefab/uiObjects/uiBulletStraight", function(a) {
a.parent = G_NODE.HALL.layer_bullet;
a.getComponent("uiBulletStraight").initWithTarget(o, t, i, n, e);
});
}
});
window.gBulletMgr = new n();
cc._RF.pop();
}, {} ],
gCloundMgr: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "86d2dtvyPdL3Zh+1HH8VQFi", "gCloundMgr");
var n = cc.Class({
properties: {},
setCloundData: function(e) {
this.cRanMoneyMax = e.cRanMoneyMax || 999;
this.cRanMoneyTime = e.cRanMoneyTime || 10;
this.cRanMoneyLevel = e.cRanMoneyLevel || 8;
this.cTimeMoneyMax = e.cTimeMoneyMax || 999;
this.cTimeMoneyExt = e.cTimeMoneyExt || [ 300, 300 ];
this.cCombineFree = e.cCombineFree || 200;
this.cDropMax = e.cDropMax || 2e4;
this.cDropBoxLevel = e.cDropBoxLevel || 6;
this.cDropBoxTime = e.cDropBoxTime || 60;
this.cDropInv = e.cDropInv || 30;
this.cOpenServiceReward = e.cOpenServiceReward;
this.cOpenMoreGame = e.cOpenMoreGame || 7;
this.cDaySupplyMax = e.cDaySupplyMax;
this.cInsertVideoLevel = e.cInsertVideoLevel || 2;
this.cWithDrawalMoney = e.cWithDrawalMoney || 1;
this.cAfterLimitDrop = e.cAfterLimitDrop || .1;
this.cAfterLimitCombine = e.cAfterLimitCombine || .1;
this.cBannerCD = e.cBannerCD || 1;
this.cMaxDropBigMoney = e.cMaxDropBigMoney;
this.cForceOpenLevel = e.cForceOpenLevel || [];
this.cPlayerExpFirst = e.cPlayerExpFirst || [ 25, 3, 30, 80, 10, 10, 3 ];
this.cPlayerExpSecond = e.cPlayerExpSecond || [ 5, 2, 0, 0, 3, 3, 1 ];
this.cMoneyWalletSign = e.cMoneyWalletSign || [ 5, 2 ];
this.cShareType = e.cShareType;
this.cFullScreenAdLimit = e.cFullScreenAdLimit;
this.cFullScreenAdRequire = e.cFullScreenAdRequire;
this.cFullScreenDayRequire = e.cFullScreenDayRequire;
this.cFullScreenRate = e.cFullScreenRate;
this.cFullScreenCD = e.cFullScreenCD;
this.cForceOpenShare = e.cForceOpenShare;
this.cCombineMoneyRate = e.cCombineMoneyRate || 1;
this.cDropMoneyRate = e.cDropMoneyRate || 1;
this.cUnionFamilyInviteExp = e.cUnionFamilyInviteExp || [ 40, 40, 20, 20, 40, 20, 20, 20, 20, 40 ];
this.cUnionFamilyInviteRed = e.cUnionFamilyInviteRed || [ 3e3, 3e3, 3e3, 3e3, 3e3, 3e3, 3e3, 3e3, 3e3, 3e3 ];
this.cGameLevelExpAward = e.cGameLevelExpAward || [ 40, 40, 50, 2e3, 8e3 ];
this.cDropPointMax = e.cDropPointMax;
this.cShareImage = e.cShareImage;
this.cShowGameBoxLevel = e.cShowGameBoxLevel || 100;
this.cGameBoxUrl = e.cGameBoxUrl;
this.cDropDoubleTowerRate = e.cDropDoubleTowerRate;
this.cDropDoubleTowerNumber = e.cDropDoubleTowerNumber;
this.cDropDoubleTowerMax = e.cDropDoubleTowerMax;
this.cDropDoubleTowerCD = e.cDropDoubleTowerCD;
this.cWindowFeedToBanner = e.cWindowFeedToBanner;
this.cShowTurntable = e.cShowTurntable;
this.cForceShowTurntable = e.cForceShowTurntable;
this.cTurntableVideoMax = e.cTurntableVideoMax;
this.cTurntableLevelMax = e.cTurntableLevelMax;
this.cTurntableTaskMax = e.cTurntableTaskMax;
this.cDropDoubleLevelLimit = e.cDropDoubleLevelLimit;
this.cTurntableSunLevel = e.cTurntableSunLevel;
this.cFriendGroupInviteRequire = e.cFriendGroupInviteRequire || 10;
this.cShowMoneyBoxLevel = e.cShowMoneyBoxLevel;
this.cShowMoneyBoxCombine = e.cShowMoneyBoxCombine;
this.cShowMoneyBoxCD = e.cShowMoneyBoxCD;
this.cShowMoneyBoxShowLimit = e.cShowMoneyBoxShowLimit;
this.cShowMoneyBoxVideoLimit = e.cShowMoneyBoxVideoLimit;
this.cShowMoneyBoxValue = e.cShowMoneyBoxValue;
this.cInGuoQing = e.cInGuoQing;
this.cShowWalletVideo = e.cShowWalletVideo;
this.cCustomerLink = e.cCustomerLink;
this.cCustomerLinkQQ = e.cCustomerLinkQQ;
gFreeLotteryMgr.setCloundInfo(e);
this.setIosCloundData(e);
gVideoTipMgr.setCloundInfo(e);
},
setCustomerData: function(e) {
this.cHideHuaWeiVideo = e.cHideHuaWeiVideo;
this.cHideHuaWei = !1;
var t = nativeData.getChannelCode(), i = nativeData.getLocalVersion();
i = parseInt(i);
console.log("[HWHD]", t, e.cHWHideVersion, i);
5 == t && e.cHWHideVersion == i && (this.cHideHuaWei = !0);
},
setIosCloundData: function(e) {
if (cc.sys.os == cc.sys.OS_IOS) {
this.cIOSHide = e.cIOSHide;
this.cOpenMoreGame = 100;
this.cShowGameBoxLevel = 100;
this.cIOSUrl = e.cIOSUrl;
this.cIOSComent = e.cIOSComent;
if (this.cIOSHide) {
this.cOpenServiceReward = 0;
this.cForceOpenLevel = [ 100, 100, 100 ];
gFreeLotteryMgr.cFreeLotteryShowLevel = 100;
gFreeLotteryMgr.cFreeLotterForceLevel = 100;
}
}
},
setChannelVideo: function(e) {
this.cVideoInsertRate = e.CpPro;
this.cVideoInsertDelay = e.CpDelay / 1e3;
this.cVideoDailyMax = e.VideoLimit;
this.cVideoInsertMax = e.CpCount;
this.cVideoCD = e.VideoTime || 1;
this.cCsjVideoCount = e.CsjCount;
this.cGdtVideoCount = e.GdtCount;
nativeData.setRewardID(gameData.userID);
},
preLoadVideo: function(e) {},
sendLogToServer: function(e) {
var t = 0;
t = e >= 10 ? e + 50 : e + 80;
webData.msgSendRecore(t);
},
loadNextVideoID: function(e) {}
});
window.gCloundMgr = new n();
cc._RF.pop();
}, {} ],
gFreeLotteryMgr: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "e8755Y67UdJAon0Pm9Ji8K/", "gFreeLotteryMgr");
function n(e, t, i) {
t in e ? Object.defineProperty(e, t, {
value: i,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = i;
return e;
}
var o = cc.Class({
extends: cc.Component,
properties: {
_lotteryRound: 0,
_lotteryRoundDay: 0,
_lotteryFirstBeginDay: 0,
_lotteryFirstEndDay: 0,
_lotteryNowBeginDay: 0,
_lotteryNowEndDay: 0
},
setCloundInfo: function(e) {
this.cFreeLotteryShowLevel = e.cFreeLotteryShowLevel;
this.cFreeLotterForceLevel = e.cFreeLotterForceLevel;
this.cFreeLotteryFreeTime = e.cFreeLotteryFreeTime;
this.cFreeLotteryLimit = e.cFreeLotteryLimit;
this.cFreeLotterySupplyTime = e.cFreeLotterySupplyTime;
this.cFreeLotterySupplyNum = e.cFreeLotterySupplyNum;
this.cFreeLotteryCycle = e.cFreeLotteryCycle;
this.cFreeLotteryRoller = e.cFreeLotteryRoller;
this.cFreeLotteryRoundTime = e.cFreeLotteryRoundTime;
this.cFreeLotterForceTime = e.cFreeLotterForceTime;
this.cFreeLotterForceClose = e.cFreeLotterForceClose;
this.cFreeLotterForceHide = e.cFreeLotterForceHide;
if (this.cFreeLotterForceHide) {
var t = nativeData.getChannelCode();
for (var i in this.cFreeLotterForceHide) {
var n = this.cFreeLotterForceHide[i];
if (t >= n[0] && t <= n[1]) {
this.cFreeLotteryShowLevel = 100;
this.cFreeLotterForceLevel = 100;
}
}
}
},
initSaveData: function() {
gameData.autoReadSave("gDayLotteryTicket", -1);
gameData.autoReadSave("gLotteryBeginTime", 0);
gameData.autoReadSave("gLotteryPices", {});
gameData.autoReadSave("gDayLotteryRecord", []);
gameData.autoReadSave("gOpenLottery", !1);
gameData.autoReadSave("gLotteryVideo", {
1: 1,
2: 0
});
gameData.autoReadSave("gWeakLotteryIndex", {
1: 1,
2: 1
});
gameData.autoReadSave("gLotterySaveMoney", {});
},
setBeginLotteryDay: function() {
if (!gameData.gLotteryBeginTime) {
var e = Math.floor(new Date().getTime() / 1e3);
gameData.set("gLotteryBeginTime", e);
console.log("[手机抽奖]开始时间", gameData.gLotteryBeginTime);
}
},
getFreeTimesToday: function() {
var e = this._lotteryRoundDay, t = this.cFreeLotteryRoundTime.length;
e > t && (e = t);
return this.cFreeLotteryRoundTime[e - 1];
},
setRoundInfo: function() {
var e = Math.floor(new Date().getTime() / 1e3), t = util.dateDifference(gameData.gLotteryBeginTime, e) + 1;
console.log("[手机抽奖]开始几天", t);
var i = Math.ceil(t / (this.cFreeLotteryCycle[0] + this.cFreeLotteryCycle[1]));
this._lotteryRound = i;
console.log("[手机抽奖]第几期", this._lotteryRound);
var o = t % (this.cFreeLotteryCycle[0] + this.cFreeLotteryCycle[1]);
this._lotteryRoundDay = 0 == o ? this.cFreeLotteryCycle[0] + this.cFreeLotteryCycle[1] : o;
console.log("[手机抽奖]第几天", this._lotteryRoundDay);
var a = new Date(1e3 * gameData.gLotteryBeginTime);
a.setHours(0);
a.setMinutes(0);
a.setSeconds(0);
this._lotteryFirstBeginDay = a.getTime();
this._lotteryFirstEndDay = this._lotteryFirstBeginDay + 864e5 * (this.cFreeLotteryCycle[0] - 1);
this._lotteryNowBeginDay = this._lotteryFirstBeginDay + 864e5 * (this._lotteryRound - 1) * (this.cFreeLotteryCycle[0] + this.cFreeLotteryCycle[1]);
this._lotteryNowEndDay = this._lotteryFirstEndDay + 864e5 * (this._lotteryRound - 1) * (this.cFreeLotteryCycle[0] + this.cFreeLotteryCycle[1]);
gameData.gWeakLotteryIndex[1] != this._lotteryRound && gameData.set("gWeakLotteryIndex", {
1: this._lotteryRound,
2: 1
});
gameData.gLotteryVideo[1] != this._lotteryRound && gameData.set("gLotteryVideo", {
1: this._lotteryRound,
2: 0
});
if (gameData.gLotteryPices[-1]) gameData.gLotteryPices[-1] != this._lotteryRound && (gameData.gLotteryPices = n({}, -1, this._lotteryRound)); else {
gameData.gLotteryPices[-1] = this._lotteryRound;
gameData.save("gLotteryPices");
}
if (gameData.gLotterySaveMoney[-1]) gameData.gLotterySaveMoney[-1] != this._lotteryRound && (gameData.gLotterySaveMoney = n({}, -1, this._lotteryRound)); else {
gameData.gLotterySaveMoney[-1] = this._lotteryRound;
gameData.save("gLotterySaveMoney");
}
-1 == gameData.gDayLotteryTicket && gameData.set("gDayLotteryTicket", this.cFreeLotteryFreeTime);
},
resetRoundInfo: function() {
console.log("[手机抽奖]重置", this._lotteryRound);
if (this._lotteryRound) {
var e = Math.floor(new Date().getTime() / 1e3) + 1, t = util.dateDifference(gameData.gLotteryBeginTime, e) + 1, i = Math.ceil(t / (this.cFreeLotteryCycle[0] + this.cFreeLotteryCycle[1]));
console.log("[手机抽奖]0点重置抽奖期书", i, this._lotteryRound, gameData.gLotteryBeginTime, e);
var n = t % (this.cFreeLotteryCycle[0] + this.cFreeLotteryCycle[1]);
this._lotteryRoundDay = 0 == n ? this.cFreeLotteryCycle[0] + this.cFreeLotteryCycle[1] : n;
console.log("[手机抽奖]第几天", this._lotteryRoundDay);
if (i != this._lotteryRound) {
this.setRoundInfo();
if (!this.getInRoundDay()) {
this.btn_lottery.active = !1;
console.log("[手机抽奖]不在周期内不显示");
}
UICtrl.closeUI("uiFreeLottery/uiFreeLottery");
UICtrl.closeUI("uiFreeLottery/uiFreeLotteryAward");
gWordMgr.showTip("本期活动已结束");
}
}
},
getInRoundDay: function() {
return !(this._lotteryRoundDay > this.cFreeLotteryCycle[0]);
},
getRoundType: function() {
return 1 == this._lotteryRound ? 1 : 2;
},
getRound: function() {
return this._lotteryRound;
},
getBusinessBeginDay: function() {
return this._lotteryNowBeginDay;
},
getBusinessEndDay: function() {
return this._lotteryNowEndDay;
},
resetClockData: function() {
gameData.set("gDayLotteryTicket", this.cFreeLotteryFreeTime);
gameData.set("gDayLotteryRecord", []);
this.resetRoundInfo();
},
addItemPices: function(e, t) {
gameData.gLotteryPices[e] ? gameData.gLotteryPices[e] += t : gameData.gLotteryPices[e] = t;
t > 0 && 11 == e && webData.msgGetPhonePices(this.getRound(), 101, t);
gameData.save("gLotteryPices");
},
getItemPices: function(e) {
return gameData.gLotteryPices[e] ? gameData.gLotteryPices[e] : 0;
},
forceOpenLottery: function() {
console.log("[手机抽奖]强弹");
console.log("TODO-gFreeLotteryMgr-forceOpenLottery()");
gameData.set("gOpenLottery", !0);
if (gameData.gOpenLottery) console.log("[手机抽奖]不强弹：打开过"); else if (cc.isValid(this.btn_lottery)) if (this.btn_lottery.active) if (0 != gameData.gDayLotteryTicket) {
UICtrl.closeAllDlg();
gWindowMgr.closeBanner();
this.openLottery();
} else console.log("[手机抽奖]不强弹：没次数"); else console.log("[手机抽奖]不强弹：没开启"); else console.log("[手机抽奖]不强弹：没开启");
},
initEvent: function(e) {
var t = this;
this.btn_lottery = e;
this.btn_lottery.quickBt(function() {
t.openLottery();
});
},
openLottery: function() {
pageData.msgInitPhoneConfig(function() {
UICtrl.openUI("uiFreeLottery/uiFreeLottery");
});
},
showLotteryBtn: function() {
if (this.cFreeLotteryShowLevel >= 100) {
this.btn_lottery.active = !1;
console.log("[手机抽奖]云控制不显示");
} else if (gameData.gMaxTower < this.cFreeLotteryShowLevel) {
this.btn_lottery.active = !1;
console.log("[手机抽奖]等级不够不显示");
} else {
this.setBeginLotteryDay();
this.setRoundInfo();
if (this.getInRoundDay()) this.btn_lottery.active = !0; else {
this.btn_lottery.active = !1;
console.log("[手机抽奖]不在周期内不显示");
}
}
},
levelUPAndShowLottery: function() {
this.btn_lottery.active || this.showLotteryBtn();
},
setUniqVideo: function() {},
reLoadVideoID: function() {},
saveLotteryHistory: function(e, t) {
var i = new Date().getTime() + "|" + e + "|" + t;
gameData.gDayLotteryRecord.push(i);
gameData.save("gDayLotteryRecord");
},
mainBtnPlayScale: function() {
var e = this.btn_lottery.scale;
this.btn_lottery.scale = 0;
var t = cc.delayTime(.5), i = cc.scaleTo(.005, .5), n = cc.scaleTo(.13, e + .05), o = cc.scaleTo(.13, e), a = cc.scaleTo(.08, e + .02), s = cc.scaleTo(.08, e), r = cc.sequence(t, i, n, o, a, s);
this.btn_lottery.runAction(r);
},
inLotteryPage: function(e) {
this._inPage = e;
e || this.mainBtnPlayScale();
},
getInLotteryPage: function() {
return this._inPage;
}
});
window.gFreeLotteryMgr = new o();
cc._RF.pop();
}, {} ],
gFriendGroupMgr: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "15b46MnLPRM2Y9KMbWjST0M", "gFriendGroupMgr");
var n = cc.Class({
properties: {},
setFriendGroupInfo: function(e) {
this.groupLevel = e.Level || 1;
this.groupSonNumber = e.TdCount || 0;
this.groupSonMax = familyLevelCsvData.getMaxByLevel(this.groupLevel);
this.groupSonList = e.TdList || [];
this.groupGrandsonList = e.TsList || [];
this.groupRed = e.UnionRed || 0;
this.groupPromoterID = e.PromoterID || 0;
this.groupPower = e.Energy || 0;
this.groupGrandsonNumber = e.TsCount || 0;
this.groupVerifySonNumber = e.ValidCount || 0;
this.groupExpBeginTime = e.DExpBeginTime;
this.groupExpTime = e.DExpTime;
this.groupRecvCount = e.RedCount || 0;
this.gInviteAwardID = e.InviteAwardID || 0;
this.setFriendGroupTimeInfo(e.RedIndex);
this.groupAllPoint = e.WaitAllExp;
this.groupSelfPoint = e.WaitSelfExp;
this._pointItemList = [];
this.groupReadyAddPoint = 0;
this._sonItemList = [];
this.updateMoreExp();
},
updateMoreExp: function() {
var e = this.groupAllPoint - this.groupSelfPoint, t = 0;
for (var i in this.groupSonList) {
var n = this.groupSonList[i].WaitExp;
n > 0 && (t += n);
}
for (var o in this.groupGrandsonList) {
var a = this.groupGrandsonList[o].WaitExp;
a > 0 && (t += a);
}
e -= t;
this.groupOtherPoint = e;
},
addRecvRewardTime: function() {
this.groupRecvCount++;
},
setFriendGroupTimeInfo: function(e) {
this.groupRecvTime = e || 0;
if (this.groupRecvTime >= 5) {
this.groupRecvMax = 1e3;
this.groupRecvMoney = 1e4;
} else {
this.groupRecvMax = familySettingCsvData.getTimeByLevel(this.groupRecvTime);
this.groupRecvMoney = familyTimesCsvData.getMoneyByTimeIndex(this.groupLevel, this.groupRecvTime);
}
},
onSetPromoterID: function(e) {
this.groupPromoterID = e;
},
onOpenFriendGroupHumenInfo: function(e, t) {
if (e && 1 == e) {
var i = this.groupPromoterID;
if (!i) {
UICtrl.openUI("uiFriendGroup/uiFriendGroupMaster");
return;
}
t = i;
}
UICtrl.openUI("uiFriendGroup/uiFriendGroupHumenInfo", function(i) {
i.initData(e, t);
});
},
setScript: function(e) {
this._script = e;
},
getScript: function() {
return this._script;
},
showVerifyBanner: function(e) {
var t = util.convetOtherNodeSpaceAR(e, this.getScript().node_verify_touch).clone();
this.getScript().node_verify_touch.getComponent("uiFriendGroupNodeTouch").showVerifyBanner(t);
},
recordPointItem: function(e) {
this._pointItemList.push(e);
},
flyAllPointItem: function() {
var e = this;
this.getScript().btn_get_all.active = !1;
this._pointItemList && (this.groupAllPoint <= 0 || webData.msgReceiveAllPowerAward(function() {
for (var t in e._pointItemList) {
var i = e._pointItemList[t];
i.unbindTouch();
i.active = !0;
i.getComponent("uiFriendGroupPoint").flyToBall(e.getScript().img_point_cricle);
e.getScript().btn_son_more.active && (e.getScript().btn_son_more.x = 290);
e.getScript().btn_grandson_more.active && (e.getScript().btn_grandson_more.x = 290);
}
e.addPowerPoint(e.groupAllPoint);
for (var n in e._sonItemList) {
e._sonItemList[n].getComponent("uiFriendGroupSonItem").updatePoint();
}
}));
},
addPowerPoint: function(e) {
this.groupReadyAddPoint += e;
if (e > 0) {
var t = cc.instantiate(this.getScript().wordPrefab);
t.parent = this.getScript().img_point_cricle;
t.getComponent("uiFriendGroupPointWord").initScript(e);
}
this.playBallShake();
},
playBallShake: function() {
this.getScript().node_point_cricle.stopAllActions();
var e = cc.scaleTo(.05, 1.1), t = cc.scaleTo(.05, 1);
this.getScript().node_point_cricle.runAction(cc.sequence(e, t));
},
onAddGroupRedNum: function(e) {
this.groupRed += e;
this.getScript() && this.getScript().onShowWalletRedTip();
},
onClearGroupRedNum: function(e) {
this.groupRed -= e;
this.getScript() && this.getScript().onShowWalletRedTip();
},
onEnableReceiveAwardInvite: function() {
for (var e = !1, t = 1; t <= 10; t++) if (t <= this.groupVerifySonNumber && t > n.gInviteAwardID) {
e = !0;
break;
}
this.getScript() && this.getScript().onPlayInviteShake(e);
},
openView: function() {
var e = this;
cc.sys.os == cc.sys.OS_IOS && gCloundMgr.cIOSHide ? shareData.openShare() : webData.msgGetUnionData(function(t) {
e.setFriendGroupInfo(t);
gWindowMgr.closeBanner();
UICtrl.openUI("uiFriendGroup/uiFriendGroup");
});
},
saveSonItem: function(e) {
this._sonItemList.push(e);
},
openSharePage: function() {
3 == gCloundMgr.cShareType ? shareData.openShare() : UICtrl.openUI("uiFriendGroup/uiFriendGroupShare");
},
flyLineMoney: function() {
var e = G_NODE.MAIN_GUIDE;
UICtrl.createUI("prefab/uiObjects/uiFlyLineMoney", function(t) {
t.parent = e;
t.getComponent("uiFlyLineMoney").initWithFamily(cc.v2(0, 0));
});
}
});
window.gFriendGroupMgr = new n();
cc._RF.pop();
}, {} ],
gFunctionMgr: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "2d75cTWf6REF69L28+mjqxQ", "gFunctionMgr");
var n = {
gMaxTower: 1,
gQuickPower: 2,
gDayTicket: 3,
gLevelMoney: 4,
gDayOnlineTime: 5,
gDayOnlineMoney: 6,
gChapter: 7,
gDividend: 8,
gDayCombineTime: 9,
gDayDropMoney: 10,
gDayVideoCount: 11,
gDayRollerCount: 12,
gDaySupplyCount: 13,
gDayDropBox: 14,
gDayRanMoney: 15,
gAllVideoCount: 16,
gAllCombineTime: 17,
gAllRollerCount: 18,
gAllLoginDay: 19,
gMaxCombineSucs: 20,
gDayTimeMoney: 21,
gSignDay: 22,
gSignQuick: 23,
gOwnTower: 24,
gDayTaskComplete: 25,
gAllTaskComplete: 26,
gNewTaskComplete: 27,
gAllCompleteDailyTask: 28,
gOwnMoney: 29,
gQuickPowerTime: 30,
gBActiveWithdrawal: 31,
gGetTrialRed: 32,
gNowDropMoney: 33,
gNextDivdendTaskLevel: 34,
gDayShareTime: 35,
gActivityMoneyOpen: 36,
gDayLotteryTicket: 37,
gDayLotteryTime: 38,
gLotteryTripleTime: 39,
gLotteryBeginTime: 40,
gDayLotterySupply: 41,
gLotteryPices: 42,
gDayLotteryBox: 43,
gLotteryVideo: 44,
gWeakLotteryIndex: 45,
gLotterySaveMoney: 46,
gDayBuyTower: 47,
gPlayerExpTotal: 48,
gLevelRedAward: 49,
gWalletFiveSignTime: 50,
gDayFullScreenAd: 51,
gDayDropDoubleTower: 52,
gDayOpenGameBox: 53,
gDayOpenGameBoxVideo: 53
}, o = cc.Class({
properties: {},
isFirstLoginToday: function(e, t) {
var i = new Date(1e3 * e), n = new Date(1e3 * t);
return i.getFullYear() != n.getFullYear() || i.getMonth() != n.getMonth() || i.getDate() != n.getDate();
},
getDailyTaskState: function(e) {
var t = 0;
if (1 == e) t = gameData.gDayVideoCount; else if (2 == e) t = gameData.gDayRollerCount; else if (3 == e) t = gameData.gDayCombineTime; else if (4 == e) t = gameData.gDaySupplyCount; else if (5 == e) {
var i = gameData.gDayTimeMoney + "";
if (-1 == i.indexOf("|")) t = 0; else {
var n = i.split("|");
t = parseInt(n[1]) - 1;
}
} else (e = 6) && (t = gameData.gDayShareTime);
return t;
},
getAchieveTaskState: function(e) {
var t = 0;
4 == e ? t = gameData.gAllVideoCount : 5 == e ? t = gameData.gAllCombineTime : 6 == e ? t = gameData.gAllRollerCount : 7 == e && (t = gameData.gInviteCount);
t || 0 == t || (t = 0);
return t;
},
getNewTaskState: function(e) {
var t = 0;
1 == e ? t = gameData.gMaxTower : 2 == e ? t = gameData.gAllVideoCount : 3 == e ? t = gameData.gInviteCount : 4 == e ? t = gameData.gAllCompleteDailyTask : 5 == e && (t = gameData.gMoney);
return t;
},
getWithDrawalState: function() {
var e = new Date().getTime();
return 1 == util.dateDifference(gameData.gRegTime, Math.floor(e / 1e3)) + 1 && !gameData.gBActiveWithdrawal;
},
getSaveData: function() {
var e = {};
for (var t in n) {
var i = n[t];
e[i] = gameData[t];
console.log("[存档]", t, e[i]);
}
console.log("[存档]=" + JSON.stringify(e));
return JSON.stringify(e);
},
setSaveData: function(e) {
var t = JSON.parse(e), i = {};
for (var o in n) {
i[n[o]] = o;
}
for (var a in t) {
var s = i[a];
console.log("[读档]", s, t[a]);
gameData.set(s, t[a]);
}
},
getDailyTaskAchieveCount: function() {
var e = gameData.gDayTaskComplete, t = 0;
for (var i in e) t++;
return t;
},
insertMoneyRecord: function(e, t) {
var i = new Date().getTime();
this.saveTreeStringToOne(e, i, t);
},
saveTreeStringToOne: function(e, t, i) {
return e + "|" + t + "|" + i;
},
saveTwoStringToOne: function(e, t) {
return e + "|" + t;
},
getOneStringToSplit: function(e) {
if (-1 != (e += "").indexOf("|")) return e.split("|");
},
playShake: function(e) {
var t = cc.rotateTo(.3, 30), i = cc.rotateTo(.3, 0), n = cc.rotateTo(.3, -30), o = cc.rotateTo(.3, 0), a = cc.rotateTo(.3, 30), s = cc.rotateTo(.3, 0), r = cc.rotateTo(.3, -30), c = cc.rotateTo(.3, 0), l = cc.sequence(t, i, n, o, a, s, r, c);
e.runAction(cc.repeatForever(l));
},
getNewUnlockByDay: function(e) {
switch (e) {
case 1:
case 2:
return 3;

case 3:
case 4:
case 5:
return 6;

case 6:
case 7:
default:
return 7;
}
},
addPlayerExp: function(e, t) {
var i = 400, n = gCloundMgr.cPlayerExpFirst[e] || 0, o = gCloundMgr.cPlayerExpSecond[e] || 0;
e == G_EXP_FROM.VIDEO ? t <= 25 ? i = n : t <= 105 && (i = o) : e == G_EXP_FROM.COMBINE ? t <= 100 ? i = n : t <= 200 && (i = o) : e == G_EXP_FROM.TASK ? i = n : e == G_EXP_FROM.SIGN ? i = n : e == G_EXP_FROM.TIME_MONEY ? t <= 10 ? i = n : t <= 30 && (i = o) : e == G_EXP_FROM.RANDOM_MONEY ? t <= 30 ? i = n : t <= 60 && (i = o) : e == G_EXP_FROM.ROLLER && (t <= 20 ? i = n : t <= 30 && (i = o));
if (i > 0) {
gameData.plus("gPlayerExpTotal", i);
gWordMgr.showTip("[增加任务经验]类型" + e + " 次数" + t + " 经验" + i + "=" + gameData.gPlayerExpTotal);
console.log("[增加任务经验]类型" + e + " 次数" + t + " 经验" + i + "=" + gameData.gPlayerExpTotal);
this.updatePlayerLevelByExp();
}
},
updatePlayerLevelByExp: function() {
var e = gameData.gPlayerExpTotal, t = levelExpCsvData.getAllDatas(), i = 0, n = gameData.gPlayerLevel;
console.log("TODO-gFunctionMgr-updatePlayerLevelByExp()1经验=" + e + " 等级=" + n + " t: " + JSON.stringify(t));
for (var o in t) {
var a = t[o], s = parseInt(a.level), r = parseInt(a.exp);
if ((i += r) > e) {
gameData.set("gPlayerLevel", s);
var c = e - (i - r);
gameData.set("gPlayerExp", c);
var l = gameData.gPlayerLevel;
if (n > 0 && l > n) {
webData.msgPlayerUP(l);
gWindowMgr.openLevelUPWindow();
}
return;
}
}
},
getDailyVideoTimes: function() {
var e = new Date().getTime(), t = util.dateDifference(gameData.gRegTime, Math.floor(e / 1e3)) + 1, i = gameData.gAllVideoCount, n = Math.floor(i / t);
console.log("[日均看视频次数]" + i + "/" + t + "=" + n);
return n;
},
openFullScreenVideo: function() {
console.log("[全屏视频]准备打开");
var e = util.randomRange(1, 100);
if (e > gCloundMgr.cFullScreenRate) console.log("[全屏视频]概率不足", e); else {
var t = new Date().getTime(), i = util.dateDifference(gameData.gRegTime, Math.floor(t / 1e3)) + 1;
if (i <= gCloundMgr.cFullScreenDayRequire) console.log("[全屏视频]注册天数不足", i); else {
var n = gameData.gAllVideoCount, o = Math.floor(n / i);
if (o >= gCloundMgr.cFullScreenAdRequire) console.log("[全屏视频]日均视频足够", o, n); else if (gameData.gDayFullScreenAd >= gCloundMgr.cFullScreenAdLimit) console.log("[全屏视频]打开次数太多", gameData.gDayFullScreenAd, gCloundMgr.cFullScreenAdLimit); else {
if (this._lastOpenFullScreenAdTime) {
var a = 1e3 * gCloundMgr.cFullScreenCD;
if (t - this.lastClickTime < a) {
console.log("[全屏视频]CD中");
return;
}
}
this._lastOpenFullScreenAdTime = t;
gameData.plus("gDayFullScreenAd", 1);
console.log("[全屏视频]打开", gameData.gDayFullScreenAd, t);
gTowerMgr.clearLayer();
shareData.toFullVideo();
}
}
}
}
});
window.gFunctionMgr = new o();
cc._RF.pop();
}, {} ],
gGuideMgr: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "ae2a4GzF6BIrL9KhKbHBgPb", "gGuideMgr");
var n = cc.Class({
properties: {
_ifGuide: !1,
_currRunStep: 0,
_hasRunMoneyGuide: !1,
_hasRunInitGuide: !1,
_guideIndex: 0
},
init: function() {},
runGuide: function() {
if (G_FRAME.IS_NEWUSER && !this._hasRunInitGuide) {
this._hasRunInitGuide = !0;
G_POS.B_GUIDE = new cc.Rect(150, 510, 200, 100);
var e = G_COM.G_HEIGHT - 52;
G_COM.G_HEIGHT > 1300 && (e = G_COM.G_HEIGHT - 52 - 35);
this._guideIndex = 1;
this.guidanceList = [ {
maskPos: cc.v2(0, 0),
maskSize: cc.size(0, 0),
hideAll: !0,
touchNext: !0,
guideWord: 1,
guideWordPos: G_COM.G_HEIGHT / 2
}, {
maskPos: cc.v2(0, 90),
maskSize: cc.size(180, 180),
hideFinger: !0,
guideWord: 2,
guideWordPos: 400
}, {
maskPos: cc.v2(-130, 830),
maskSize: cc.size(250, 110),
hideArraw: !0,
finger: 2,
guideWord: 3,
guideWordPos: 550
}, {
maskPos: cc.v2(-76, e),
maskSize: cc.size(283, 73),
hideArraw: !0,
touchNext: !0,
guideWord: 4,
guideFingerOffset: 70,
guideWordPos: G_COM.G_HEIGHT - 400
}, {
maskPos: cc.v2(0, 0),
maskSize: cc.size(0, 0),
hideAll: !0,
touchNext: !0,
guideWord: 5,
guideWordPos: G_COM.G_HEIGHT / 2
} ];
this._ifGuide = !0;
this._currRunStep = 0;
this.runStep();
}
},
runMoneyGuide: function() {
if (G_FRAME.IS_NEWUSER && !this._hasRunMoneyGuide) {
this._hasRunMoneyGuide = !0;
var e = G_COM.G_HEIGHT - 52;
G_COM.G_HEIGHT > 1300 && (e = G_COM.G_HEIGHT - 52 - 35);
this._guideIndex = 2;
this.guidanceList = [ {
maskPos: cc.v2(-76, e),
maskSize: cc.size(283, 73),
hideArraw: !0,
touchNext: !0,
guideWord: 6,
guideFingerOffset: 70,
guideWordPos: G_COM.G_HEIGHT - 400
} ];
this._ifGuide = !0;
this._currRunStep = 0;
this.runStep();
}
},
showBuyTowerGuide: function(e) {
var t = this;
this.guideTip && cc.isValid(this.guideTip) || UICtrl.createUI("prefab/uiGuide/uiGuideTip", function(i) {
i.parent = G_NODE.HALL.img_quick_build;
i.getComponent("uiGuideTip").initTimes(e);
i.y = 50;
t.guideTip = i;
});
},
runStepBuyTowerGuide: function() {
this.guideTip && cc.isValid(this.guideTip) && this.guideTip.getComponent("uiGuideTip").doTouchThisNode();
},
showCombinetowerGuide: function() {
var e = this;
if (this._ifGuide) gameData.gNoOperaTime = 0; else if (this.guideFinger && cc.isValid(this.guideFinger)) gameData.gNoOperaTime = 0; else if (this.guideTip && cc.isValid(this.guideTip)) gameData.gNoOperaTime = 0; else {
gameData.gNoOperaTime = 1e3;
var t = gTowerMgr.getExistCombineTower();
t ? UICtrl.createUI("prefab/uiGuide/uiGuideFinger", function(i) {
i.parent = G_NODE.HALL.layer_ground;
e.guideFinger = i;
e.guideFinger.getComponent("uiGuideFinger").showGuideFinger(t[0], t[1]);
}) : this.showBuyTowerGuide(1);
}
},
runStepCombineTowerGuide: function() {
gameData.gNoOperaTime = 0;
this.guideFinger && cc.isValid(this.guideFinger) && this.guideFinger.destroy();
},
runStep: function() {
var e = this;
if (this._ifGuide) {
this._currRunStep = this._currRunStep + 1;
1 == this._guideIndex && 1 == this._currRunStep ? webData.msgSendRecore(G_WINDOW_FROM.GUIDE_1) : 1 == this._guideIndex && 2 == this._currRunStep ? webData.msgSendRecore(G_WINDOW_FROM.GUIDE_2) : 1 == this._guideIndex && 3 == this._currRunStep ? webData.msgSendRecore(G_WINDOW_FROM.GUIDE_3) : 1 == this._guideIndex && 4 == this._currRunStep ? webData.msgSendRecore(G_WINDOW_FROM.GUIDE_4) : 2 == this._guideIndex && 1 == this._currRunStep && webData.msgSendRecore(G_WINDOW_FROM.GUIDE_5);
if (this._currRunStep > this.guidanceList.length) this.guideEnd(); else {
var t = this.guidanceList[this._currRunStep - 1];
this.guideLayer && cc.isValid(this.guideLayer) ? this.guideLayer.getComponent("uiGuideLayer").showStep(t) : UICtrl.createUI("prefab/uiGuide/uiGuideLayer", function(i) {
i.parent = G_NODE.GUIDE;
e.guideLayer = i;
e.guideLayer.getComponent("uiGuideLayer").showStep(t);
});
}
}
},
getRunStep: function() {
return this._currRunStep;
},
inGuide: function() {
return this._ifGuide;
},
guideEnd: function() {
this.guideLayer && cc.isValid(this.guideLayer) && this.guideLayer.destroy();
this._ifGuide = !1;
2 == this._guideIndex && this.showBuyTowerGuide(2);
}
});
window.gGuideMgr = new n();
cc._RF.pop();
}, {} ],
gMainMgr: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "2bc18togEpCJ6TeO8q+68Jx", "gMainMgr");
var n = cc.Class({
extends: cc.Component,
properties: {
_onShowTime: 0
},
init: function() {
this.onBackground();
this.beginInterval();
this.beginFallBox();
this.beginSaveData();
this.beginUnionTip();
this.setGeTuiTag();
},
enterNextChapter: function() {
G_NODE.HALL.initChapter();
},
stopGame: function() {
console.log("[主战斗暂停]");
G_COM.STOP_GAME = !0;
gMonsterMgr.stopGame();
gTowerMgr.stopGame();
gWealthMgr.stopGame();
},
resumeGame: function() {
console.log("[主战斗继续]");
G_COM.STOP_GAME = !1;
gMonsterMgr.resumeGame();
gTowerMgr.resumeGame();
gWealthMgr.resumeGame();
},
signOut: function() {
this.reset();
gameData.reset();
gPigMgr.reset();
cc.game.restart();
},
reset: function() {
this.clearInv();
this.unscheduleAllCallbacks();
},
openMiddleVideoNow: function() {
this.haveMidAD = !0;
shareData.toInterAD();
},
openMiddleVideo: function() {
this.haveMidAD = !1;
var e = 1, t = function() {
e++;
if (GM.touchScreen) {
e = 0;
this.haveMidAD = !1;
}
if (!this.haveMidAD) {
GM.touchScreen = !1;
if (e >= 60) {
e = 0;
if (util.randomRange(1, 1e3) <= 80) {
if (0 != gameData.currTab || this.onFullWeb) return;
console.log("[打开插屏广告]");
shareData.toInterAD();
this.haveMidAD = !0;
}
}
}
};
this.unschedule(t);
this.schedule(t, 1);
},
addOpenMiddleVideo: function(e) {
var t = this;
if (!this.haveMidAD) {
util.randomRange(1, 100) <= this._mProInter && e.scheduleOnce(function() {
if (!t.haveMidAD) {
t.haveMidAD = !0;
console.log("[打开插屏广告]");
shareData.toInterAD();
}
}, this._nDelayInter);
}
},
onBackground: function() {
var e = this;
cc.game.on(cc.game.EVENT_SHOW, function() {
setTimeout(function() {
nativeData.fullSucsCallback && nativeData.onFullScreenAdBack();
G_NODE.HALL.uiGameBoxCom && G_NODE.HALL.uiGameBoxCom.checkInstallBox();
if (e._onHideTime && e._onHideTime > 10) {
G_NODE.QUICK_TOWER && G_NODE.QUICK_TOWER.initPower();
G_NODE.TIME_MONEY && G_NODE.TIME_MONEY.initTime();
}
if (gameData.fromAD) {
gameData.fromAD = !1;
e._onHideTime = 0;
console.log("[进入前台]:从视频过来");
} else if (e._onHideTime > 0) {
var t = new Date().getTime(), i = Math.floor((t - e._onHideTime) / 1e3);
console.log("进入后台时间", e._onHideTime, t, i);
e._onHideTime = 0;
if (i > 300) {
gWindowMgr.closeBanner();
cc.sys.restartVM();
return;
}
}
}, 200);
});
cc.game.on(cc.game.EVENT_HIDE, function() {
e._onHideTime = new Date().getTime();
gameData.fromAD || webData.msgSaveGameData();
});
},
beginInterval: function() {
this.clearInv();
this.invFunc = setInterval(function() {
gameData.plus("gDayOnlineTime", 1);
gameData.plus("gCurrOnlineTime", 1);
gameData.plus("gNoOperaTime", 1);
gameData.gMaxTower <= 10 && gameData.gNoOperaTime > 3 && gameData.gNoOperaTime < 1e3 && gGuideMgr.showCombinetowerGuide();
gameData.gServerTime = gameData.gServerTime + 1;
var e = new Date(), t = e.getHours(), i = e.getMinutes(), n = e.getSeconds();
0 == t && 0 == i && 0 == n ? this.resetClockData(0) : 12 == t && 0 == i && 0 == n ? this.resetClockData(12) : 18 == t && 0 == i && 0 == n && this.resetClockData(18);
}.bind(this), 1e3);
},
getDividendPrpcess: function() {
var e = Number(gameData.gDividend);
e > 8995 && (e = 8995);
gameData.gAllLoginDay >= 3 && (e += 1e3);
e >= 9995 && (e = 9995);
return Number(e);
},
resetClockData: function(e) {
if (0 == e) {
console.log("[0点重置]");
gameData.gDayTicket < 10 && gameData.set("gDayTicket", 10);
gameData.set("gDayOnlineTime", 0);
gameData.set("gDayOnlineMoney", 0);
gameData.set("gDayCombineTime", 0);
gameData.set("gDayDropMoney", 0);
gameData.set("gDayTimeMoney", 0);
gameData.set("gDayTaskComplete", {});
gameData.set("gDayVideoCount", 0);
gameData.set("gDayRollerCount", 0);
gameData.set("gDayDropBox", 0);
gameData.set("gDayRanMoney", 0);
gameData.set("gDaySupplyCount", 0);
gameData.set("gDayResetOver12", !1);
gameData.set("gDayResetOver18", !1);
gameData.set("gDayInvVideo", 0);
gameData.set("gDayShareTime", 0);
gameData.set("gDayBuyTower", 0);
gameData.set("gOpenLottery", !1);
gameData.set("gDayFullScreenAd", 0);
gameData.set("gOpenUnionWindow", !0);
gameData.set("gDayDropDoubleTower", 0);
gameData.set("gDayGetTaskMoney", !1);
gameData.set("gDayOpenGameBox", 0);
gameData.set("gDayOpenGameBoxVideo", 0);
gameData.set("gDayWalletVideoTip", {});
gFreeLotteryMgr.resetClockData();
gVideoTipMgr.resetClockData();
} else if (12 == e) {
gameData.set("gDayResetOver12", !0);
console.log("[12点重置]");
gameData.gDayTicket < 10 && gameData.set("gDayTicket", 10);
} else if (18 == e) {
gameData.set("gDayResetOver18", !0);
console.log("[18点重置]");
gameData.gDayTicket < 10 && gameData.set("gDayTicket", 10);
}
},
clearInv: function() {
this.invFunc && clearInterval(this.invFunc);
},
beginFallBox: function() {
var e = gCloundMgr.cDropInv;
this.schedule(function() {
//console.log("TODO-gMainMgr-beginFallBox()空投红包");
//gTowerMgr.dropAirBox();
}, e);
},
beginSaveData: function() {
var e = this;
this.scheduleOnce(function() {
webData.msgSaveGameData();
e.schedule(function() {
webData.msgSaveGameData();
}, 240);
}, 60);
},
beginUnionTip: function() {
console.log("TODO-gMainMgr-beginUnionTip()");
//this.schedule(function() {
//webData.msgGetUnionTip();
//}, 30);
this.scheduleOnce(function() {
webData.msgGetUnionTip();
}, 10);
},
getRandomShareImage: function() {
var e = gCloundMgr.cShareImage;
e.sort(function() {
return .5 - Math.random();
});
var t = e[0];
gameData.shareImageIndex = t;
console.log("随机到了分享图片", t);
var i = shareData.getShareImage(t);
cc.loader.load({
url: i,
type: "png"
}, function(e, t) {});
},
setGeTuiTag: function() {
var e = nativeData.getLocalVersion();
console.log("[个推发送]本地版本", e);
if (!(e < 1076)) {
var t = new Date().Format("yyyyMMdd");
nativeData.setGeTuiTag(t);
}
}
});
window.gMainMgr = new n();
cc._RF.pop();
}, {} ],
gMapMgr: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "87c3fgsQTNJuK715ea2XwC6", "gMapMgr");
var n = cc.Class({
extends: cc.Component,
properties: {
_towerTileList: [],
_pathTileList: [],
_birthPointKey: 0,
_towerTiles: void 0,
_towerTileCover: void 0,
_tileWidth: 6,
_tileHeight: 6,
_tileSize: 120,
_inputLog: !1
},
init: function(e) {
var t = e.getComponent(cc.TiledMap);
this.initMapData(t);
},
initMapData: function(e) {
this._towerTileList = [];
this._pathTileList = [];
this._birthPointKey = 0;
this._towerTiles = void 0;
var t = e.getMapSize();
this._tileWidth = t.width;
this._tileHeight = t.height;
var i = e.getTileSize();
this._tileSize = i.width;
var n = e.getLayer("path"), o = e.getLayer("tower1"), a = e.getLayer("begin"), s = n._tiles, r = o._tiles, c = a._tiles;
this._towerTiles = r;
this.initTowerList(r);
this.initPointList();
this.initBirthPoint(c);
this.initPathList(s);
},
initTowerList: function(e) {
var t = this;
e.forEach(function(e, i) {
0 != e && t._towerTileList.push(i);
});
},
initPathList: function(e) {
var t = this, i = [];
this._pathTileList = [];
var n = this._birthPointKey, o = void 0;
e.forEach(function(e, a) {
if (0 != e) {
var s = a + 1, r = s % t._tileWidth, c = parseInt(s / t._tileHeight);
c++;
if (0 == r) {
c--;
r = t._tileWidth;
}
var l = {
key: a,
row: r,
line: c = 7 - c,
pos: G_COM.PATH_LIST[a],
hasUse: !1
};
i.push(l);
if (n == a) {
l.hasUse = !0;
o = l;
}
}
});
if (o) {
this._pathTileList.push(o);
this.getNextPath(i, o.row, o.line);
this._inputLog && console.log("[初始化路径列表]", this._pathTileList);
} else this._inputLog && console.log("[ERROR：表错误，起始点缺失]");
},
getNextPath: function(e, t, i) {
var n = this;
e.forEach(function(o) {
if (0 == o.hasUse && (o.line == i && o.row == t - 1 || o.line == i && o.row == t + 1 || o.line == i + 1 && o.row == t || o.line == i - 1 && o.row == t)) {
o.hasUse = !0;
n._pathTileList.push(o);
n.getNextPath(e, o.row, o.line);
} else ;
});
},
initBirthPoint: function(e) {
var t = this;
e.forEach(function(e, i) {
if (0 != e) {
t._birthPointKey = i;
t._inputLog && console.log("[初始化路径起始点]", t._birthPointKey);
}
});
},
initPointList: function() {
for (var e = 1; e <= 36; e++) {
var t = e % 6, i = parseInt(e / 6);
i++;
if (0 == t) {
i--;
t = 6;
}
i = 7 - i;
var n = cc.v2(t * this._tileSize - this._tileSize / 2, i * this._tileSize - this._tileSize / 2);
G_COM.PATH_LIST.push(n);
}
},
getTowerMapList: function() {
var e = {};
this._towerTileList.forEach(function(t) {
e[t] = 0;
});
this._inputLog && console.log("[初始化塔点列表]", e);
return e;
},
getRoadPath: function() {
return this._pathTileList;
},
getCrystalPos: function() {
var e = this._pathTileList.length;
return this._pathTileList[e - 1].pos;
},
getOrderByPos: function(e) {
var t = parseInt(e.x / this._tileSize) + 1, i = parseInt(e.y / this._tileSize) + 1;
if (t > this._tileHeight || i > this._tileHeight) return -1;
var n = ((i = 7 - i) - 1) * this._tileHeight + t;
return n -= 1;
}
});
window.gMapMgr = new n();
cc._RF.pop();
}, {} ],
gMonsterMgr: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "c5ab3S3QWxJr6dTRs5M0pKl", "gMonsterMgr");
var n = cc.Class({
extends: cc.Component,
properties: {
_monsterNodeList: void 0,
_inCreate: !1,
_firstIn: !0,
_damageRate: 1
},
init: function() {},
touchCreateMonster: function() {
var e = this;
this._monsterNodeList = {};
this._inCreate = !0;
var t = gMapMgr.getRoadPath(), i = stageCsvData.getMonsterList(), n = stageCsvData.getMonsterIntv(), o = stageCsvData.getIsBossChapter(), a = i.length, s = 0;
this._damageRate = configCsvData.cDamageLimit[0] + (a - 1) + configCsvData.cDamageLimit[1];
o && !this._firstIn && G_NODE.HALL.showBossWarn(i[0]);
this._firstIn = !1;
var r = stageCsvData.getCurrChapterType();
this.schedule(function() {
var n = G_COM.MONSTER_GID;
G_COM.MONSTER_GID++;
var o = {
mID: i[s],
mPath: t,
mGID: n,
mIsBoss: 1 == r
};
++s >= a && (e._inCreate = !1);
UICtrl.createUI("prefab/uiObjects/uiMonster", function(t) {
e._monsterNodeList[n] = t;
t.uiMonster = t.getComponent("uiMonster");
t.zIndex = 100 - s;
t.parent = G_NODE.HALL.layer_monster;
t.uiMonster.initConfig(o);
});
}, n, a - 1);
},
delMonster: function(e) {
if (this._monsterNodeList[e]) {
this._monsterNodeList[e].destroy();
delete this._monsterNodeList[e];
if (!this._inCreate && 0 == Object.keys(this._monsterNodeList).length) {
G_NODE.HALL.gameSucs();
return;
}
}
},
monsterRatch: function() {
this.unscheduleAllCallbacks();
G_NODE.HALL.gameFail();
for (var e in this._monsterNodeList) {
this._monsterNodeList[e].getComponent("uiMonster").playChaire();
}
},
clear: function() {
G_NODE.HALL.layer_monster.destroyAllChildren();
this._monsterNodeList = {};
},
getMonsterList: function() {
return this._monsterNodeList ? this._monsterNodeList : {};
},
stopGame: function() {
var e = this.getMonsterList();
for (var t in e) {
e[t].uiMonster.stopGame();
}
cc.director.getScheduler().pauseTarget(this);
},
resumeGame: function() {
var e = this.getMonsterList();
for (var t in e) {
e[t].uiMonster.resumeGame();
}
cc.director.getScheduler().resumeTarget(this);
},
getDamageRate: function() {
return this._damageRate / 1e4;
}
});
window.gMonsterMgr = new n();
cc._RF.pop();
}, {} ],
gProtoMgr: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "3888aX4zKVDmKM8dVyEBqjY", "gProtoMgr");
e("protobuf");
var n = cc.Class({
properties: {},
ctor: function() {
0;
setTimeout(function() {});
},
encode: function(e) {
var t = this.pRoot.lookupType("SAVE_DATA");
if (!t) return "";
var i = t.create(e), n = t.encode(i).finish();
return this.Uint8ArrayToString(n);
},
Uint8ArrayToString: function(e) {
for (var t = "", i = 0; i < e.length; i++) t += String.fromCharCode(e[i]);
return t;
},
stringToUint8Array: function(e) {
for (var t = [], i = 0, n = e.length; i < n; ++i) t.push(e.charCodeAt(i));
return new Uint8Array(t);
},
decode: function(e) {
var t = this.pRoot.lookupType("SAVE_DATA");
if (!t) return "";
var i = t.decode(this.stringToUint8Array(e));
return t.toObject(i);
}
});
window.gProtoMgr = new n();
cc._RF.pop();
}, {
protobuf: "protobuf"
} ],
gTipsMgr: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "e53e6guL0tLR7y4qQcIWEhw", "gTipsMgr");
var n = cc.Class({
extends: cc.Component,
properties: {
_showLog: !1
},
isTaskComplete: function() {
var e = taskDailyCsvData.getAllDatas();
for (var t in e) {
var i = e[t], n = i.ID, o = i.parm, a = gFunctionMgr.getDailyTaskState ? gFunctionMgr.getDailyTaskState(n) : 0, s = gameData.gDayTaskComplete[n];
if (a >= o && !s) {
this._showLog && console.log("[任务提示]每日已完成未领取", n, a, o);
return !0;
}
}
var r = taskAchieveCsvData.getAllDatas();
for (var c in r) {
var l = r[c], u = l.achieve_level, h = l.parm, d = l.achieve_type, g = gFunctionMgr.getAchieveTaskState(d), f = this.getNowAchieveTaskComplete(d, u);
if (f == u && g >= h) {
this._showLog && console.log("[任务提示]成就已完成未领取", f, g, h);
return !0;
}
}
var p = taskDivdendCsvData.getAllDatas();
for (var m in p) {
var _ = p[m];
if (3 == _.ID) {
var v = gameData.gMaxTower, y = _.parm;
gameData.gNextDivdendTaskLevel || gameData.set("gNextDivdendTaskLevel", y);
if (v >= (y = gameData.gNextDivdendTaskLevel)) return !0;
}
}
return !1;
},
getNowAchieveTaskComplete: function(e, t) {
var i = gameData.gAllTaskComplete;
if (void 0 != i[e]) return parseInt(i[e]) + 1;
gameData.gAllTaskComplete[e] = 0;
gameData.save("gAllTaskComplete");
return t;
},
isNewMoneyComplete: function() {
var e = newMoneyCsvData.getAllDatas();
gameData.gAllLoginDay || gameData.set("gAllLoginDay", 1);
var t = gFunctionMgr.getNewUnlockByDay(gameData.gAllLoginDay);
for (var i in e) {
var n = e[i], o = n.day, a = n.ID, s = n.task_type, r = n.parm;
if (t >= o) {
var c = gFunctionMgr.getNewTaskState(s);
if (!(!!gameData.gNewTaskComplete && gameData.gNewTaskComplete[a]) && c >= r) {
this._showLog && console.log("[新人红包提示]完成未领取", a);
return !0;
}
}
}
return !1;
},
isSignComplete: function() {
var e = gameData.gSignDay + "";
if (-1 == e.indexOf("|")) return !0;
var t = e.split("|"), i = parseInt(t[0]);
if (!util.checkSameDay(i)) {
this._showLog && console.log("[签到提示]今天未签到", i);
return !0;
}
for (var n = onLineMoneyCsvData.getAllDatas(), o = 1; o <= 4; o++) {
var a = n[o];
a.seconds = 60 * parseInt(a.online_min);
if (gameData.gDayOnlineTime >= a.seconds && gameData.gDayOnlineMoney < o) {
this._showLog && console.log("[签到提示]有可领取的在线奖励", gameData.gDayOnlineTime, a.seconds, gameData.gDayOnlineMoney, o);
return !0;
}
}
return !1;
},
isLevelMoneyComplete: function() {
var e = levelMoneyCsvData.getAllDatas();
for (var t in e) {
var i = e[t], n = i.level;
if (gameData.gMaxTower >= n && !gameData.gLevelMoney[i.id]) {
this._showLog && console.log("[等级红包提示]等级达到未领取", n);
return !0;
}
}
return !1;
},
isRollerComplete: function() {
return gameData.gDayTicket > 0;
},
isGameLevelRedComplete: function() {
for (var e = {
1: 10,
2: 20,
3: 30
}, t = gameData.get("gPlayerLevel"), i = gameData.get("gLevelRedAward"), n = 0, o = !1, a = 1; a <= 3; a++) {
var s = e[a];
if (i >= s) n = a; else if (t >= s && a == n + 1) {
o = !0;
break;
}
}
return o;
}
});
window.gTipsMgr = new n();
cc._RF.pop();
}, {} ],
gTowerMgr: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "d63d64lud1KgLflaK+rsqYh", "gTowerMgr");
var n = 1, o = 0, a = 2, s = cc.Class({
extends: cc.Component,
properties: {
_towerPointList: void 0,
_towerPointEmptyList: void 0,
_towerNodeList: void 0,
_lastMoveID: void 0,
_mainTower: void 0,
_totalPower: 0,
_soundTower: 0,
_towerMoneyNodeList: void 0,
inputLog: !1
},
init: function() {
this.initData();
},
initData: function() {
this._towerNodeList = {};
this._towerMoneyNodeList = {};
this._lastMoveID = -1;
},
createTowerInPos: function(e, t, i) {
var n = 1;
if (i) n = i; else {
n = this.getEmptyTowerList()[0];
}
var o = {
tID: e,
tOrder: n,
tAppearPos: t
};
audioData.playSoundByID(6, !0);
this.createTower(o);
},
getEmptyTowerList: function() {
var e = [];
for (var t in this._towerPointList) if (this._towerPointList[t] == o) {
t = parseInt(t);
e.push(t);
}
return e;
},
getEmptyOrder: function() {
var e = this.getEmptyTowerList();
return e.length > 0 ? e[0] : -1;
},
setBoxInOrder: function(e) {
this._towerPointList[e] = a;
},
removeBoxInOrder: function(e) {
this._towerPointList[e] = o;
this._towerMoneyNodeList[e].destroy();
delete this._towerMoneyNodeList[e];
},
createTower: function(e) {
var t = this;
if (this._towerPointList[e.tOrder] != n) if (this._towerPointList[e.tOrder] != a) if (void 0 !== this._towerPointList[e.tOrder]) {
if (!(e.tID >= 72)) {
this._towerPointList[e.tOrder] = n;
UICtrl.createUI("prefab/uiObjects/uiTower", function(i) {
i.parent = G_NODE.HALL.layer_tower;
i.uiTower = i.getComponent("uiTower");
i.uiTower.initConfig(e);
t._towerNodeList[e.tOrder] = i;
gameData.gOwnTower[e.tOrder] = e.tID;
gameData.set("gOwnTower", gameData.gOwnTower);
});
this.changeMainTower(e.tID);
}
} else console.log("[创建错误，该位置无法创建塔]", e.tOrder); else console.log("[创建错误，改位置有箱子]", e.tOrder); else console.log("[创建错误，改位置有塔]", e.tOrder);
},
destroyTower: function(e) {
if (this._towerNodeList[e]) {
this._towerPointList[e] = o;
this._towerNodeList[e].uiTower.getID();
this._towerNodeList[e].destroy();
delete this._towerNodeList[e];
delete gameData.gOwnTower[e];
gameData.set("gOwnTower", gameData.gOwnTower);
}
},
checkMoveOver: function(e, t, i) {
if (-1 == this._lastMoveID) this._lastMoveID = e; else {
if (e == this._lastMoveID) return;
this._lastMoveID = e;
}
if (e != t) {
this.hideTowerInfo();
if (-1 != e) if (void 0 != this._towerPointList[e]) {
var n = !1, o = !1, a = cc.v2(0, 0);
for (var s in this._towerNodeList) {
var r = this._towerNodeList[s].uiTower.getID();
if (e == this._towerNodeList[s].uiTower.getOrder()) {
n = !0;
a = this._towerNodeList[s].position.add(cc.v2(0, 100));
i == r && (o = !0);
}
}
n ? o ? this.checkMoveOverCombine(a) : this.checkMoveOverChange(a) : this.checkMoveOverHide();
} else this.checkMoveOverHide(); else this.checkMoveOverHide();
} else this.checkMoveOverHide();
},
checkMoveOverCombine: function(e) {
G_NODE.HALL.node_tower_change.active = !1;
G_NODE.HALL.node_tower_combine.active = !0;
G_NODE.HALL.node_tower_combine.position = e;
},
checkMoveOverChange: function(e) {
G_NODE.HALL.node_tower_change.active = !0;
G_NODE.HALL.node_tower_combine.active = !1;
G_NODE.HALL.node_tower_change.position = e;
},
checkMoveOverHide: function() {
G_NODE.HALL.node_tower_change.active = !1;
G_NODE.HALL.node_tower_combine.active = !1;
},
checkMoveOpera: function(e, t, i, n) {
this.checkMoveOverHide();
G_NODE.HALL.hideShopDel();
this.hideTowerInfo();
this.checkLightSameID(-1, -1);
if (this._towerPointList[e] != a) if (e != t) if (-1 != e) if (void 0 != this._towerPointList[e]) if (this._towerNodeList[e]) {
var o = this._towerNodeList[e].uiTower.getID();
o >= towerCsvData.getMaxTowerLevel() ? gWordMgr.showTip("已达到最高等级") : o != i ? this.towerChange(o, i, t, e) : this.towerCombine(o, i, t, e);
} else this.towerMove(o, i, t, e); else {
this.inputLog && console.log("[在非塔格子中取消]", e, this._towerPointList);
this.towerDelete(t, i);
} else this.inputLog && console.log("[拖动场外取消]", e, t, i); else this.inputLog && console.log("[拖动在自己头顶取消]", e, t, i); else console.log("[在假塔头顶取消]");
},
towerDelete: function(e, t) {
var i = this;
if (gGuideMgr.inGuide()) console.log("[引导中不能回收]"); else {
this.inputLog && console.log("[拖动在商店中删除]");
var n = towerCsvData.getSellMoney(t);
UICtrl.openUI("uiCommon/uiCommonMoney", function(t) {
t.initNormalClose(G_MONEY_FROM.SELL, n, function(t) {
t && i.destroyTower(e);
});
});
}
},
towerMove: function(e, t, i, n) {
this.inputLog && console.log("[拖动结束移动]", n, i, t);
var o = this._towerNodeList[i].uiTower.getID();
this._towerNodeList[i].uiTower.initPos();
this.destroyTower(i);
this.createTower({
tID: o,
tOrder: n
});
this.clearLayer();
gGuideMgr.runStepCombineTowerGuide();
},
towerCombine: function(e, t, i, n) {
var o = this, a = e + 1;
if (a >= towerCsvData.getMaxTowerLevel()) {
this.destroyTower(n);
UICtrl.openUI("uiGame/uiCombineFail", function(e) {
e.initData();
});
} else {
var s = function() {
o._towerNodeList[n].uiTower.initPos();
o._towerNodeList[i].uiTower.initPos();
o.destroyTower(n);
o.destroyTower(i);
o.createTower({
tID: a,
tOrder: n,
tCombineEff: !0
});
o.clearLayer();
G_FRAME.IS_NEWUSER && 2 == a && gGuideMgr.runStep();
};
a > gameData.gMaxTower ? webData.msgSaveLevel(a, function() {
s();
}) : s();
gGuideMgr.runStepCombineTowerGuide();
}
},
towerChange: function(e, t, i, n) {
audioData.playSoundByID(8, !0);
this.inputLog && console.log("[拖动结束交换]", n, i, t);
this._towerNodeList[n].uiTower.initPos();
this._towerNodeList[i].uiTower.initPos();
this.destroyTower(n);
this.destroyTower(i);
this.createTower({
tID: e,
tOrder: i
});
this.createTower({
tID: t,
tOrder: n
});
this.clearLayer();
gGuideMgr.runStepCombineTowerGuide();
},
checkLightSameID: function(e, t) {
for (var i in this._towerNodeList) i != t && this._towerNodeList[i].uiTower.checkLightSameID(e);
for (var n in this._towerMoneyNodeList) this._towerMoneyNodeList[n].opacity = -1 == e ? 255 : 150;
},
getCurrCreateTower: function() {
console.log("TODO-gTowerMgr-getCurrCreateTower()", G_COM.TOWER_ID_BEGIN, G_COM.TOWER_ID_END);
return util.randomRange(G_COM.TOWER_ID_BEGIN, G_COM.TOWER_ID_END);
},
createGhostTower: function(e, t, i) {
UICtrl.createUI("prefab/uiObjects/uiTower", function(n) {
n.parent = G_NODE.HALL.layer_ghost;
n.uiTower = n.getComponent("uiTower");
var o = {
tID: e,
tOrder: t
};
n.uiTower.initGhostConfig(o);
i(n);
});
this.checkLightSameID(e, t);
G_NODE.HALL.showShopDel();
this.showTowerInfo(e, t);
},
clearLayer: function() {
G_NODE.HALL.layer_ghost.destroyAllChildren();
},
touchAllCancel: function() {
for (var e in this._towerNodeList) {
this._towerNodeList[e].uiTower.touchCancel();
}
},
showTowerInfo: function(e, t) {
G_NODE.HALL.showTowerInfo(e, t);
},
hideTowerInfo: function() {
G_NODE.HALL.hideTowerInfo();
},
initMainTower: function() {
cc.isValid(this._mainTower) && this._mainTower.destroy();
var e = 1, t = gameData.get("gOwnTower");
for (var i in t) {
var n = t[i];
n > e && (e = n);
}
var o = gameData.get("gMaxTower");
if (e > o) {
o = e;
gameData.set("gMaxTower", o);
}
this.createMainTower(o);
},
createMainTower: function(e) {
var t = this;
if (cc.isValid(this._mainTower)) {
this._mainTower.uiTower.getID();
this._mainTower.destroy();
}
UICtrl.createUI("prefab/uiObjects/uiTower", function(i) {
i.parent = G_NODE.HALL.layer_tower;
i.uiTower = i.getComponent("uiTower");
var n = {
tID: e,
tOrder: -1
};
i.uiTower.initMainConfig(n);
t._mainTower = i;
});
},
changeMainTower: function(e) {
var t = gameData.get("gMaxTower");
if (e > t) {
t = e;
gameData.set("gMaxTower", t);
this.createMainTower(t);
this.updateGradeOtherTower();
this.openUnlockWindow(e);
e >= 30 ? dividendCsvData.addProcess(2) : dividendCsvData.addProcess(1);
G_NODE.HALL.updateMoreGameIcon();
gFreeLotteryMgr.levelUPAndShowLottery();
}
},
createLastLoginTower: function() {
console.log("[创建保存的塔]");
this._towerPointList = void 0;
this._towerPointEmptyList = void 0;
this.setTowerPoint();
for (var e in this._towerNodeList) this._towerNodeList[e].removeFromParent();
this._towerNodeList = {};
G_NODE.HALL.layer_tower.destroyAllChildren();
var t = gameData.get("gOwnTower");
if (t) for (var i in t) {
var n = t[i];
if (n > 0) {
var o = {
tID: n,
tOrder: i
};
this.createTower(o);
}
}
},
createLastDropMoney: function() {
var e = this, t = gameData.get("gOwnMoney");
if (t) {
var i = function(i) {
var n = t[i], o = {};
if (i < 0) {
o.tOrder = parseInt(-i);
o.tType = 2;
} else {
o.tOrder = parseInt(i);
o.tType = 3;
}
o.tValue = n;
console.log("[空投]初始化", o.tType, o.tValue);
e.setBoxInOrder(o.tOrder);
UICtrl.createUI("prefab/uiObjects/uiTowerBox", function(t) {
t.parent = G_NODE.HALL.layer_tower;
t.getComponent("uiTowerBox").initScript(o);
e._towerMoneyNodeList[o.tOrder] = t;
});
};
for (var n in t) i(n);
}
},
setTowerPoint: function() {
if (!this._towerPointList) {
this._towerPointList = gMapMgr.getTowerMapList();
this._towerPointEmptyList = this.getServerPos(this._towerPointList);
}
},
forceCreateTower: function(e) {
console.log("增加炮塔", e);
if (-1 != this.getEmptyOrder()) this.createTowerInPos(e); else {
var t = e, i = 0;
for (var n in this._towerNodeList) {
var o = this._towerNodeList[n].uiTower.getID();
if (o < t) {
t = o;
i = n;
}
}
if (i > 0) {
this.destroyTower(i);
this.createTower({
tID: e,
tOrder: i
});
}
}
},
openUnlockWindow: function(e) {
var t = towerCsvData.getUnlockPower(e), i = gWindowMgr.isForceOpenLevel(e), n = !1;
G_FRAME.IS_NEWUSER && e == gFreeLotteryMgr.cFreeLotterForceLevel && (n = !0);
var o = e == gCloundMgr.cForceOpenShare, a = e == gCloundMgr.cForceShowTurntable[0] || e == gCloundMgr.cForceShowTurntable[1];
if (t <= 0) {
if (i) {
gWindowMgr.openNextForceWindow(G_WINDOW_FROM.NORMAL);
return;
}
if (n) {
gWindowMgr.openNextForceWindow(G_WINDOW_FROM.LOTTERY);
return;
}
if (o) {
gWindowMgr.openNextForceWindow(G_WINDOW_FROM.FAMILY);
return;
}
if (a) {
gWindowMgr.openNextForceWindow(G_WINDOW_FROM.TURNTABLE);
return;
}
} else UICtrl.openUI("uiUnlock/uiWindowUnlock", function(t) {
i && t.setForceWindow(G_WINDOW_FROM.NORMAL);
n && t.setForceWindow(G_WINDOW_FROM.LOTTERY);
o && t.setForceWindow(G_WINDOW_FROM.FAMILY);
a && t.setForceWindow(G_WINDOW_FROM.TURNTABLE);
t.initData(e);
});
},
getServerPos: function(e) {
var t = {}, i = 1;
for (var n in e) {
t[n] = i;
i++;
}
return t;
},
stopGame: function() {
for (var e in this._towerNodeList) {
this._towerNodeList[e].uiTower.stopGame();
}
cc.isValid(this._mainTower) && this._mainTower.uiTower.stopGame();
},
resumeGame: function() {
for (var e in this._towerNodeList) {
this._towerNodeList[e].uiTower.resumeGame();
}
cc.isValid(this._mainTower) && this._mainTower.uiTower.resumeGame();
},
dropAirBox: function() {
var e = this;
if (gameData.gDayDropBox > gCloundMgr.cDropBoxTime) console.log("[空投]次数不够", gameData.gDayDropBox); else if (gameData.gMaxTower < gCloundMgr.cDropBoxLevel) console.log("[空投]等级不够", gameData.gMaxTower); else {
var t = this.getEmptyOrder();
if (-1 != t) {
gameData.plus("gDayDropBox", 1);
var i = dropBoxCsvData.getAllDatas(), n = util.randomRange(1, 100), o = 1, a = 0;
for (var s in i) if (n <= (a += parseInt(i[s].weight))) {
o = s;
break;
}
var r = 0;
if (gameData.gOwnMoney) for (var c in gameData.gOwnMoney) gameData.gOwnMoney[c] > 0 && r++;
r >= gCloundMgr.cMaxDropBigMoney && 3 == o && (o = 2);
var l = 0;
1 == o ? l = G_NODE.QUICK_TOWER.getCurrBuyTowerID() : 2 == o ? l = util.randomRange(i[2].parm1, i[2].parm2) : 3 == o && (l = util.randomRange(i[3].parm1, i[3].parm2));
var u = {
tOrder: t,
tType: o,
tValue: l
};
console.log("[空投]配置", u);
this.setBoxInOrder(t);
UICtrl.createUI("prefab/uiObjects/uiTowerBox", function(i) {
i.parent = G_NODE.HALL.layer_tower;
i.getComponent("uiTowerBox").initScript(u);
e._towerMoneyNodeList[t] = i;
});
} else console.log("[空投]没空位");
}
},
updateGradeOtherTower: function() {
var e = towerCsvData.getLowFreeID(gameData.gMaxTower);
console.log("升级所有低级塔到", e);
for (var t in this._towerNodeList) {
var i = this._towerNodeList[t].uiTower.getID(), n = this._towerNodeList[t].uiTower.getOrder();
if (i < e) {
this.destroyTower(n);
this.createTower({
tID: e,
tOrder: n,
tCombineEffOnly: !0
});
}
}
this.clearLayer();
},
getExistCombineTower: function() {
var e = void 0;
for (var t in this._towerNodeList) {
for (var i in this._towerNodeList) {
var n = this._towerNodeList[t].uiTower.getID(), o = this._towerNodeList[i].uiTower.getID(), a = this._towerNodeList[t].uiTower.getOrder(), s = this._towerNodeList[i].uiTower.getOrder();
if (n == o && a != s) {
e = [ a, s ];
break;
}
}
if (e) break;
}
var r = 0;
for (var c in this._towerNodeList) r++;
return e && r > 6 ? e : null;
},
isTowerNodeExist: function(e) {
return this._towerNodeList[e];
},
getTowerPos: function(e) {
return G_COM.PATH_LIST[e].clone();
},
getSoundTower: function() {
return this._soundTower;
},
addSoundTower: function() {
this._soundTower++;
},
delSoundTower: function() {
this._soundTower--;
}
});
window.gTowerMgr = new s();
cc._RF.pop();
}, {} ],
gTurntableMgr: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "e9d09idQ7VH+Ij2CgqGa3Qv", "gTurntableMgr");
var n = cc.Class({
extends: cc.Component,
properties: {},
initEvent: function(e) {
var t = this;
this.btn_turntable = e;
this.btn_turntable.quickBt(function() {
t.openTurntable();
});
},
openTurntable: function(e) {
var t = this;
cc.sys.os == cc.sys.OS_IOS && gCloundMgr.cIOSHide || webData.msgGetTurntableInfo(function() {
t.defaultTab = e || 0;
UICtrl.openUI("uiTurntable/uiTurntable");
});
},
showTurntableBtn: function() {
cc.sys.os == cc.sys.OS_IOS && gCloundMgr.cIOSHide ? this.btn_turntable.active = !1 : 1 == gCloundMgr.cShowTurntable ? this.btn_turntable.active = !0 : this.btn_turntable.active = !1;
},
getDefaultIndex: function() {
if (this.defaultTab) {
var e = this.defaultTab;
this.defaultTab = 0;
return e;
}
var t = webData.getturntableInfo();
return t.TaskNum > 0 ? 2 : t.InviteNum > 0 ? 3 : t.LevelNum > 0 ? 1 : t.SuperNum > 0 ? 4 : 2;
},
setLessTurntableTime: function(e) {
var t = 0;
for (var i in e) e[i] > 0 && t++;
gameData.set("gGetTurntable", t);
}
});
window.gTurntableMgr = new n();
cc._RF.pop();
}, {} ],
gVideoTipMgr: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "fad35DI7otNJaYZyXjSZaOS", "gVideoTipMgr");
var n = cc.Class({
properties: {},
setCloundInfo: function(e) {
this.cVideoTouchTipRange = e.cVideoTouchTipRange;
this.cVideoTouchTipNew = e.cVideoTouchTipNew;
this.cVideoTouchTipOld = e.cVideoTouchTipOld;
this.cVideoTouchTipIndex = e.cVideoTouchTipIndex;
this.cVideoTouchLevelUPLevel = e.cVideoTouchLevelUPLevel;
this.cVideoTouchLevelUPMax = e.cVideoTouchLevelUPMax;
this.cVideoTouchLevelUPRate = e.cVideoTouchLevelUPRate;
this.cVideoTouchWalletFullRate = e.cVideoTouchWalletFullRate;
this.cVideoTouchWalletEmptyRate = e.cVideoTouchWalletEmptyRate;
this.cVideoTouchPhoneRate = e.cVideoTouchPhoneRate;
this.cVideoTouchUnlockLevel = e.cVideoTouchUnlockLevel;
this.cVideoTouchUnlockRate = e.cVideoTouchUnlockRate;
this.cVideoTouchMoneyMax = e.cVideoTouchMoneyMax;
this.cVideoTouchMoneyRate = e.cVideoTouchMoneyRate;
this.cVideoTouchBeforeWallet = e.cVideoTouchBeforeWallet;
},
setCityHide: function() {
var e = this;
this._inCityRange = !0;
var t = gameData.readValue("city");
if (t && "undefined" != t) this.setCityHideString(t); else {
this._inCityRange = !0;
HTTP.GET3("http://pv.sohu.com/cityjson?ie=utf-8", function(t) {
e.setCityHideString(t);
});
}
},
setCityHideString: function(e) {
for (var t in this.cVideoTouchTipRange) {
var i = this.cVideoTouchTipRange[t];
if (-1 != e.indexOf(i)) {
this._inCityRange = !1;
console.log("[显示视频提示]匹配到城市", e);
break;
}
}
console.log("[显示视频提示]城市", e);
this.initVideoTipHide();
},
initVideoTipHide: function() {
console.log("[显示视频提示]开始判断");
if (this._inCityRange) {
var e = util.randomRange(1, 100);
if (gameData.gOnFirstDay) {
if (e <= this.cVideoTouchTipNew) {
console.log("[显示视频提示]新用户不显示", e, this.cVideoTouchTipNew);
this._showVideoTip = !1;
return;
}
} else if (e <= this.cVideoTouchTipOld) {
console.log("[显示视频提示]老用户不显示", e, this.cVideoTouchTipOld);
this._showVideoTip = !1;
return;
}
console.log("[显示视频提示]显示");
this._showVideoTip = !0;
gCloundMgr.cHideHuaWei && (this._showVideoTip = !1);
} else {
console.log("[显示视频提示]特定城市不显示");
this._showVideoTip = !1;
this.cVideoTouchBeforeWallet = !1;
}
},
getIsShowVideoTipUnlock: function() {
if (!this._showVideoTip) {
console.log("[显示视频提示]前置不满足");
return !1;
}
if (gCloundMgr.currShowVideoIndex < this.cVideoTouchTipIndex) {
console.log("[显示视频提示]视频价高不显示", gCloundMgr.currShowVideoIndex, this.cVideoTouchTipIndex);
return !1;
}
if (!(gameData.gMaxTower < this.cVideoTouchUnlockLevel)) {
var e = util.randomRange(1, 100);
if (e > this.cVideoTouchUnlockRate) {
console.log("[显示视频提示]概率不足", e, this.cVideoTouchUnlockRate);
return !1;
}
webData.msgSendRecore(G_WINDOW_FROM.VIDEO_TIP_UNLOCK);
return !0;
}
console.log("[显示视频提示]炮塔等级不足");
},
getIsShowVideoTipPhone: function() {
if (!this._showVideoTip) {
console.log("[显示视频提示]前置不满足");
return !1;
}
if (gCloundMgr.currShowVideoIndex < this.cVideoTouchTipIndex) {
console.log("[显示视频提示]视频价高不显示", gCloundMgr.currShowVideoIndex, this.cVideoTouchTipIndex);
return !1;
}
var e = util.randomRange(1, 100);
if (e > this.cVideoTouchPhoneRate) {
console.log("[显示视频提示]概率不足", e, this.cVideoTouchPhoneRate);
return !1;
}
webData.msgSendRecore(G_WINDOW_FROM.VIDEO_TIP_PHPNE);
return !0;
},
getIsShowVideoTipCombineFail: function() {
if (!this._showVideoTip) {
console.log("[显示视频提示]前置不满足");
return !1;
}
if (gCloundMgr.currShowVideoIndex < this.cVideoTouchTipIndex) {
console.log("[显示视频提示]视频价高不显示", gCloundMgr.currShowVideoIndex, this.cVideoTouchTipIndex);
return !1;
}
return !0;
},
getIsShowVideoTipMoney: function() {
if (!this._showVideoTip) {
console.log("[显示视频提示]前置不满足");
return !1;
}
if (gCloundMgr.currShowVideoIndex < this.cVideoTouchTipIndex) {
console.log("[显示视频提示]视频价高不显示", gCloundMgr.currShowVideoIndex, this.cVideoTouchTipIndex);
return !1;
}
var e = util.randomRange(1, 100);
if (e > this.cVideoTouchMoneyRate) {
console.log("[显示视频提示]概率不足", e, this.cVideoTouchMoneyRate);
return !1;
}
if (gameData.gDayShowVideoTipMoney >= this.cVideoTouchMoneyMax) {
console.log("[显示视频提示]达到上限", gameData.gDayShowVideoTipMoney, this.cVideoTouchMoneyMax);
return !1;
}
gameData.plus("gDayShowVideoTipMoney", 1);
webData.msgSendRecore(G_WINDOW_FROM.VIDEO_TIP_RED);
return !0;
},
getIsShowVideoTipLevelUP: function() {
if (!this._showVideoTip) {
console.log("[显示视频提示]前置不满足");
return !1;
}
if (gCloundMgr.currShowVideoIndex < this.cVideoTouchTipIndex) {
console.log("[显示视频提示]视频价高不显示", gCloundMgr.currShowVideoIndex, this.cVideoTouchTipIndex);
return !1;
}
if (gameData.gPlayerLevel <= this.cVideoTouchLevelUPLevel) {
console.log("[显示视频提示]账号等级不足", gameData.gPlayerLevel, this.cVideoTouchLevelUPLevel);
return !1;
}
var e = util.randomRange(1, 100);
if (e > this.cVideoTouchLevelUPRate) {
console.log("[显示视频提示]概率不足", e, this.cVideoTouchLevelUPRate);
return !1;
}
if (gameData.gDayShowVideoTipLevel >= this.cVideoTouchLevelUPMax) {
console.log("[显示视频提示]达到上限", gameData.gDayShowVideoTipLevel, this.cVideoTouchLevelUPMax);
return !1;
}
gameData.plus("gDayShowVideoTipLevel", 1);
webData.msgSendRecore(G_WINDOW_FROM.VIDEO_TIP_LEVEL_UP);
return !0;
},
getIsShowVideoTipWalletEmpty: function() {
if (!this._showVideoTip) {
console.log("[显示视频提示]前置不满足");
return !1;
}
if (gCloundMgr.currShowVideoIndex < this.cVideoTouchTipIndex) {
console.log("[显示视频提示]视频价高不显示", gCloundMgr.currShowVideoIndex, this.cVideoTouchTipIndex);
return !1;
}
var e = util.randomRange(1, 100);
if (e > this.cVideoTouchWalletEmptyRate) {
console.log("[显示视频提示]概率不足", e, this.cVideoTouchWalletEmptyRate);
return !1;
}
return !0;
},
getIsShowVideoTipWalletFull: function() {
if (!this._showVideoTip) {
console.log("[显示视频提示]前置不满足");
return !1;
}
if (gCloundMgr.currShowVideoIndex < this.cVideoTouchTipIndex) {
console.log("[显示视频提示]视频价高不显示", gCloundMgr.currShowVideoIndex, this.cVideoTouchTipIndex);
return !1;
}
var e = util.randomRange(1, 100);
if (e > this.cVideoTouchWalletFullRate) {
console.log("[显示视频提示]概率不足", e, this.cVideoTouchWalletFullRate);
return !1;
}
webData.msgSendRecore(G_WINDOW_FROM.VIDEO_TIP_WALLET);
return !0;
},
resetClockData: function() {
gameData.set("gDayShowVideoTipMoney", 0);
gameData.set("gDayShowVideoTipLevel", 0);
}
});
window.gVideoTipMgr = new n();
cc._RF.pop();
}, {} ],
gWealthMgr: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "5361dd3Dq9BWaBPyxqBr3lI", "gWealthMgr");
var n = cc.Class({
extends: cc.Component,
properties: {},
init: function() {},
createMoneyEffect: function(e, t) {
var i = this;
t = Math.floor(t * gCloundMgr.cDropMoneyRate);
gameData.gDayDropMoney + t >= gCloundMgr.cDropMax && (t = Math.floor(t * gCloundMgr.cAfterLimitDrop));
// console.log("TODO-gWealthMgr-createMoneyEffect()创建打死怪兽后加金币的效果，金币*100");
t *= 100;
gameData.plus("gDayDropMoney", t);
gameData.plus("gNowDropMoney", t);
this.createFlyEffect(e);
G_NODE.HALL.scheduleOnce(function() {
i.updateMoney(t, !1, G_MONEY_FLOW.MONSTER);
gGuideMgr.runMoneyGuide();
}, .8);
},
createTowerEffect: function(e, t) {
var i = this;
this.flyMoneyFromTower(e);
G_NODE.HALL.scheduleOnce(function() {
i.updateMoney(t, !1, G_MONEY_FLOW.TOWER);
}, .8);
},
createFlyEffect: function(e) {
UICtrl.createUI("prefab/uiObjects/uiFlySingleMoney", function(t) {
t.parent = G_NODE.HALL.layer_world;
t.getComponent("uiFlySingleMoney").initWithTarget(e);
});
},
flyGoodFromNode: function(e) {
if (cc.isValid(e)) {
var t = G_NODE.MAIN_GUIDE, i = util.convetOtherNodeSpaceAR(e, t).clone();
UICtrl.createUI("prefab/uiObjects/uiFlyCricleMoney", function(e) {
e.parent = t;
e.getComponent("uiFlyCricleMoney").initWithTarget(i);
});
}
},
flyMoneyFromTower: function(e) {
if (cc.isValid(e)) {
var t = G_NODE.MAIN_GUIDE, i = util.convetOtherNodeSpaceAR(e, t).clone();
UICtrl.createUI("prefab/uiObjects/uiFlyLineMoney", function(e) {
e.parent = t;
e.getComponent("uiFlyLineMoney").initWithTarget(i);
});
}
},
flyMoneyToTurntable: function(e) {
if (cc.isValid(e)) {
var t = G_NODE.MAIN_GUIDE, i = util.convetOtherNodeSpaceAR(e, t).clone();
UICtrl.createUI("prefab/uiObjects/uiFlyLineMoney", function(e) {
e.parent = t;
e.getComponent("uiFlyLineMoney").initWithTurntable(i);
});
}
},
flyTowerFromNode: function(e, t) {
if (cc.isValid(e)) {
var i = G_NODE.MAIN_GUIDE, n = util.convetOtherNodeSpaceAR(e, i).clone();
UICtrl.createUI("prefab/uiObjects/uiFlyBezierTower", function(e) {
e.parent = i;
e.getComponent("uiFlyBezierTower").initWithTarget(n);
});
G_NODE.QUICK_TOWER.showPlus(t);
}
},
updateMoney: function(e, t, i) {
G_NODE.HALL.updateMoneyUI(e, !0, i);
t && this.flyMoneyFromTower(t);
},
flyFriendGroupPower: function(e) {
cc.isValid(e) || (e = cc.Canvas.instance.node);
var t = G_NODE.MAIN_GUIDE, i = util.convetOtherNodeSpaceAR(e, t).clone();
UICtrl.createUI("prefab/uiObjects/uiFlyLineUnion", function(e) {
e.parent = t;
e.getComponent("uiFlyLineUnion").initWithTarget(i);
});
},
flyFriendGroupPowerOne: function() {
var e = G_NODE.MAIN_GUIDE;
UICtrl.createUI("prefab/uiObjects/uiFlyLineUnionOne", function(t) {
t.parent = e;
t.getComponent("uiFlyLineUnionOne").initWithTarget(cc.v2(0, 0));
});
},
sendChapterMoney: function() {
//console.log("TODO-gWealthMgr-sendChapterMoney()");
//if (!(gameData.gNowDropMoney <= 0)) {
//webData.msgSaveMoney(G_MONEY_FROM.MONSTER, gameData.gNowDropMoney);
//gameData.set("gNowDropMoney", 0);
//}
},
stopGame: function() {
cc.director.getScheduler().pauseTarget(this);
},
resumeGame: function() {
cc.director.getScheduler().resumeTarget(this);
}
});
window.gWealthMgr = new n();
cc._RF.pop();
}, {} ],
gWindowMgr: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "c410f6kWodL4pHDHx7a3vK+", "gWindowMgr");
var n = cc.Class({
extends: cc.Component,
properties: {
_openCount: 0,
_bannerInCD: !1
},
forceOpenWindow: function() {
G_FRAME.IS_NEWUSER || this.forceOpenSign();
},
forceOpenSign: function() {
var e = gTipsMgr.isSignComplete();
console.log("[开局强弹]签到", e);
console.log("TODO-gWindowMgr-forceOpenSign()");
e = false
if (e) {
UICtrl.openUI("uiSign/uiSign", function(e) {
e.setForceWindow(G_WINDOW_FROM.ROLLER);
});
this._openCount++;
} else this.forceOpenRoller();
},
forceOpenRoller: function() {
var e = gTipsMgr.isRollerComplete();
console.log("[开局强弹]转盘", e);
console.log("TODO-gWindowMgr-forceOpenRoller()");
e = false;
if (e) {
UICtrl.openUI("uiRoller/uiRoller", function(e) {
e.setForceWindow(G_WINDOW_FROM.TASK);
});
this._openCount++;
} else this.forceOpenTask();
},
forceOpenTask: function() {
if (!(this._openCount >= 2)) {
var e = gTipsMgr.isTaskComplete();
console.log("[开局强弹]任务", e);
console.log("TODO-gWindowMgr-forceOpenTask()");
e = false;
if (e) {
UICtrl.openUI("uiTask/uiTask", function(e) {
e.setForceWindow(G_WINDOW_FROM.NEW);
});
this._openCount++;
} else this.forceOpenNew();
}
},
forceOpenNew: function() {
if (!(this._openCount >= 2)) {
var e = gTipsMgr.isNewMoneyComplete();
console.log("[开局强弹]新人福利", e);
if (e) {
UICtrl.openUI("uiNewMoney/uiNewMoney", function() {});
this._openCount++;
}
}
},
openNextForceWindow: function(e) {
var t = this;
this.scheduleOnce(function() {
if (e == G_WINDOW_FROM.ROLLER) t.forceOpenRoller(); else if (e == G_WINDOW_FROM.TASK) t.forceOpenTask(); else if (e == G_WINDOW_FROM.NEW) t.forceOpenNew(); else if (e == G_WINDOW_FROM.NORMAL) t.forceOpenWinGameWindow(); else if (e == G_WINDOW_FROM.LOTTERY) gFreeLotteryMgr.forceOpenLottery(); else if (e == G_WINDOW_FROM.FAMILY) {
if (cc.sys.os == cc.sys.OS_IOS && gCloundMgr.cIOSHide) return;
gFriendGroupMgr.openView();
} else e == G_WINDOW_FROM.TURNTABLE && gTurntableMgr.openTurntable();
}, .1);
},
forceOpenWinGameWindow: function() {
if (gameData.gActivityMoneyOpen) {
if (1 == gCloundMgr.cOpenServiceReward && !gameData.gOpenWithDrawalWindow) {
UICtrl.openUI("uiActiveWithdrawal/uiActiveWithdrawal");
return;
}
} else if (gameData.gMaxTower >= gCloundMgr.cShowGameBoxLevel && !gameData.gOpenWithDrawalWindow && (0 == gameData.gBoxUser || 2 == gameData.gBoxUser)) {
G_NODE.HALL.openGameBox();
return;
}
gameData.gOpenWithLevelWindow ? gameData.gOpenWithNewWindow || UICtrl.openUI("uiNewMoney/uiNewMoney") : UICtrl.openUI("uiLevelRed/uiLevelRed");
},
isForceOpenLevel: function(e) {
if (!gCloundMgr.cForceOpenLevel) return !1;
for (var t in gCloundMgr.cForceOpenLevel) if (e == gCloundMgr.cForceOpenLevel[t]) return !0;
return !1;
},
toBannerCD: function() {
var e = this;
this._bannerInCD = !0;
this.scheduleOnce(function() {
e._bannerInCD = !1;
}, gCloundMgr.cBannerCD);
},
isInBannerCD: function() {
console.log("[BANNERCD中]", this._bannerInCD);
return this._bannerInCD;
},
openLevelUPWindow: function() {
gVideoTipMgr.getIsShowVideoTipLevelUP() && UICtrl.openUI("uiVideoTip/uiVideoTipLevelUP");
},
toShowBanner: function() {
console.log("[弹出banner]");
this.closeBanner();
this._hasShowBanner = !0;
nativeData.showBanner();
console.log("TODO-gWindowMgr-toShowBanner()", this._hasShowBanner, this._hasShowFeed);
this.closeBanner();
},
toShowFeed: function() {
console.log("[弹出信息流]");
this.closeBanner();
this._hasShowFeed = !0;
nativeData.showFeed();
console.log("TODO-gWindowMgr-toShowFeed()", this._hasShowBanner, this._hasShowFeed);
this.closeBanner();
},
closeBanner: function() {
if (this._hasShowBanner) {
console.log("[关闭banner]");
nativeData.hideBanner();
this._hasShowBanner = !1;
}
if (this._hasShowFeed) {
console.log("[关闭信息流]");
nativeData.hideFeed();
this._hasShowFeed = !1;
}
}
});
window.gWindowMgr = new n();
cc._RF.pop();
}, {} ],
gWordMgr: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "db617bvX/NBL4c5fv7mt3wP", "gWordMgr");
var n = cc.Class({
extends: cc.Component,
properties: {
_flowCount: 0
},
init: function() {
this.mWordCount = {};
this.scheduleAndClear();
},
scheduleAndClear: function() {
var e = this;
this.schedule(function() {
e.mWordCount = {};
}, G_COM.WORD_CLEAR_TIME);
},
createWord: function(e, t, i, n) {
this.mWordCount[e] || (this.mWordCount[e] = 0);
this.mWordCount[e] += 1;
this.mWordCount[e] > G_COM.WORD_TIME_MAX || (n ? UICtrl.createUI("prefab/uiObjects/uiWordCrit", function(e) {
e.parent = G_NODE.HALL.layer_world;
e.getComponent("uiWordCrit").initScript(t, i, n);
}) : UICtrl.createUI("prefab/uiObjects/uiWord", function(e) {
e.parent = G_NODE.HALL.layer_world;
e.getComponent("uiWord").initScript(t, i, n);
}));
},
createFlowGold: function(e, t) {
UICtrl.createUI("prefab/uiObjects/uiFlowMoney", function(i) {
i.parent = G_NODE.HALL.img_money_banner_1;
i.getComponent("uiFlowMoney").initScript(e, t);
});
},
showTip: function(e) {
e && UICtrl.openUI("uiTip/uiTip", function(t) {
t.initScript(e);
});
},
showTip2: function(e) {
gVideoTipMgr.getIsShowVideoTipWalletEmpty() && UICtrl.openUI("uiTip/uiTip2", function(t) {
t.initScript(e);
});
},
showArtEffect: function(e, t, i, n) {
null != e && "" != e && cc.loader.loadRes(e, cc.Prefab, function(e, o) {
if (e) cc.error(e.message || e); else if (cc.isValid(t)) {
var a = cc.instantiate(o);
i && i.pos && a.setPosition(i.pos);
i && i.zIndex && (a.zIndex = i.zIndex);
t.addChild(a);
n && (a.getComponent(cc.Animation).Hurt = function() {
n();
});
a.getComponent(cc.Animation).on("stop", function(e, t) {
i && i.notDestroy || a.destroy();
}, t);
}
});
},
playGoldSound: function(e) {
e || this._flowCount++;
var t = this._flowCount % 8;
0 == t && (t = 8);
var i = t + 12;
audioData.playSoundByID(i, !0);
}
});
window.gWordMgr = new n();
cc._RF.pop();
}, {} ],
gameData: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "486d2ecdpxOvLPmL8Qf2hBw", "gameData");
var n = e("baseData"), o = cc.Class({
extends: n,
name: "gameData",
properties: {
_hasInitServer: {
default: !1,
override: !0
},
_initFinish: void 0
},
initSaveData: function() {
var e = this.userID;
this.setSaveKey(e);
console.log("[读取本地数据]", e);
this.autoReadSave("gMusic", 0);
this.autoReadSave("gEffect", 1);
this.autoReadSave("gVibrate", 1);
this.autoReadSave("gMoney", 0);
var t = configCsvData.cFreeTowerMax || 40;
this.autoReadSave("gQuickPower", t);
this.autoReadSave("gDayTicket", 10);
this.autoReadSave("gLevelMoney", {});
this.autoReadSave("gDayOnlineTime", 0);
this.autoReadSave("gDayOnlineMoney", 0);
this.autoReadSave("gChapter", 1011);
this.autoReadSave("gDividend", 0);
this.autoReadSave("gDayCombineTime", 0);
this.autoReadSave("gDayDropMoney", 0);
this.autoReadSave("gDayVideoCount", 0);
this.autoReadSave("gDayRollerCount", 0);
this.autoReadSave("gDaySupplyCount", 0);
this.autoReadSave("gDayDropBox", 0);
this.autoReadSave("gAllVideoCount", 0);
this.autoReadSave("gAllCombineTime", 0);
this.autoReadSave("gAllRollerCount", 0);
this.autoReadSave("gAllLoginDay", 0);
this.autoReadSave("gAllCompleteDailyTask", 0);
this.autoReadSave("gMaxCombineSucs", 0);
this.autoReadSave("gDayRanMoney", 0);
this.autoReadSave("gDayTimeMoney", "");
this.autoReadSave("gSignDay", "");
this.autoReadSave("gSignQuick", "");
this.autoReadSave("gOwnTower", {
7: 1
});
this.autoReadSave("gDayTaskComplete", {});
this.autoReadSave("gAllTaskComplete", {});
this.autoReadSave("gNewTaskComplete", {});
this.autoReadSave("gOwnMoney", {});
this.autoReadSave("gQuickPowerTime", 0);
this.autoReadSave("gDayResetOver12", !1);
this.autoReadSave("gDayResetOver18", !1);
this.autoReadSave("gBActiveWithdrawal", 0);
this.autoReadSave("gTrialList", {});
this.autoReadSave("gPlayedList", {});
this.autoReadSave("gGetTrialRed", !1);
this.autoReadSave("gNowDropMoney", 0);
this.autoReadSave("gDayInvVideo", 0);
this.autoReadSave("gDayShareTime", 0);
this.autoReadSave("gNextDivdendTaskLevel", 0);
this.autoReadSave("gDayBuyTower", 0);
this.autoReadSave("gPowerAuto", 0);
this.autoReadSave("gPowerVideo", 0);
this.autoReadSave("gPowerRoller", 0);
this.autoReadSave("gPowerUnlock", 0);
this.autoReadSave("gPowerDrop", 0);
this.gCurrOnlineTime = 0;
this.gNoOperaTime = 0;
this.autoReadSave("gOpenWithDrawalWindow", !1);
this.autoReadSave("gOpenWithNewWindow", !1);
this.autoReadSave("gOpenWithLevelWindow", !1);
this.autoReadSave("gOpenUnionWindow", !0);
this.autoReadSave("gActivityMoneyOpen", 0);
this.autoReadSave("gPlayerLevel", 1);
this.autoReadSave("gPlayerExp", 0);
this.autoReadSave("gPlayerExpTotal", 0);
this.autoReadSave("gLevelRedAward", 0);
this.autoReadSave("gWalletFiveSignTime", 0);
this.autoReadSave("gDayFullScreenAd", 0);
gFreeLotteryMgr.initSaveData();
this.autoReadSave("gDayShowVideoTipMoney", 0);
this.autoReadSave("gDayShowVideoTipLevel", 0);
this.autoReadSave("gUserName", "");
this.autoReadSave("gUserPhone", "");
this.autoReadSave("gUserAddress", "");
this.set("gDayLotteryBox", 1071);
this.autoReadSave("gDropDoubleTowerIndex", 0);
this.autoReadSave("gDayDropDoubleTower", 0);
this.autoReadSave("gDropDoubleTowerTime", 0);
this.autoReadSave("gDayGetTaskMoney", !1);
this.autoReadSave("gOppoCancelLoginTime", 0);
this.autoReadSave("gDayOpenGameBox", 0);
this.autoReadSave("gDayOpenGameBoxVideo", 0);
this.autoReadSave("gDayWalletVideoTip", {});
}
});
window.gameData = new o();
cc._RF.pop();
}, {
baseData: "baseData"
} ],
init: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "02edbwTExZAja0QqtiL035V", "init");
window.util = e("util");
window.MD5 = e("md5");
window.ui = {
baseNode: e("baseNode"),
baseDlg: e("baseDlg"),
baseLayer: e("baseLayer")
};
cc._RF.pop();
}, {
baseDlg: "baseDlg",
baseLayer: "baseLayer",
baseNode: "baseNode",
md5: "md5",
util: "util"
} ],
itemCsvData: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "a51b67JSudCu6iCL/p+ljD/", "itemCsvData");
var n = e("csvData"), o = cc.Class({
extends: n,
name: "itemCsvData",
properties: {
_fileName: {
override: !0,
default: "item"
}
},
getItemName: function(e) {
return this.getValueByIDKey(e, "name");
},
getItemNameIcon: function(e) {
return "image/lottery/names/name_" + e;
},
getItemIcon: function(e) {
var t = e;
t > 11 && (t = 11);
return "image/lottery/goods/goods_" + t;
},
getItemPices: function(e) {
var t = e;
t > 11 && (t = 11);
return "image/lottery/pices/pices_" + t;
},
getItemMax: function(e) {
return parseInt(this.getValueByIDKey(e, "num"));
},
getItemLimit: function(e) {
return parseInt(this.getValueByIDKey(e, "limite_num"));
}
});
window.itemCsvData = new o();
cc._RF.pop();
}, {
csvData: "csvData"
} ],
levelExpCsvData: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "34b971U6jhDhof6vGclRjie", "levelExpCsvData");
var n = e("csvData"), o = cc.Class({
extends: n,
name: "levelExpCsvData",
properties: {
_fileName: {
override: !0,
default: "levelexp"
}
},
getExp: function(e) {
return this.getValueByIDKey(e, "exp");
}
});
window.levelExpCsvData = new o();
cc._RF.pop();
}, {
csvData: "csvData"
} ],
levelMoneyCsvData: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "c06357Rln5HTLnKg+YI9bky", "levelMoneyCsvData");
var n = e("csvData"), o = cc.Class({
extends: n,
properties: {
_fileName: {
override: !0,
default: "level_honbao"
}
}
});
window.levelMoneyCsvData = new o();
cc._RF.pop();
}, {
csvData: "csvData"
} ],
lotteryDivdendCsvData: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "b4d5bEd7MVLHY6Jp2FMd6pK", "lotteryDivdendCsvData");
var n = e("csvData"), o = cc.Class({
extends: n,
properties: {
_fileName: {
override: !0,
default: "lottery_divdend"
}
}
});
window.lotteryDivdendCsvData = new o();
cc._RF.pop();
}, {
csvData: "csvData"
} ],
luckyRollerData: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "b4436Jq9QFJBr6xLwmKFK/B", "luckyRollerData");
var n = e("csvData"), o = cc.Class({
extends: n,
name: "luckyRollerData",
properties: {
_fileName: {
override: !0,
default: "lottery"
}
}
});
window.luckyRollerData = new o();
cc._RF.pop();
}, {
csvData: "csvData"
} ],
lwAdConfig: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "7c059WO58FCuZ8X93Vz+lRR", "lwAdConfig");
var n = "https://lwtg-api.lwfjmj.com", o = cc.Class({
extends: e("baseData"),
properties: {
server_url_get_res: n + "/advert/get",
server_url_mark_res: n + "/advert/mark",
app_secret: "EbqPAdiGgAWEz9rZOuINzWJXuijSTnlk",
app_api: "lwadver.ws.produce.Jd^dk!s73KsOo2",
reward_id: "10201347209",
banner_id: "10201347209",
feed_id: "10201347209",
inter_id: "10201347209",
splash_id: "10201347209"
}
});
window.lwAdConfig = new o();
cc._RF.pop();
}, {
baseData: "baseData"
} ],
lwAdSdk: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "70c29v2zxNHUINqFZNAb/Bc", "lwAdSdk");
var n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
return typeof e;
} : function(e) {
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
}, o = e("baseAdData"), a = cc.Class({
extends: e("baseData"),
properties: {
uiList: [],
openingUI: {
default: {}
},
_strBannerID: "",
_strRewardID: "",
_strFeedID: "",
_strSplashID: "",
_strInterID: "",
_uiRewardVideoPath: "lwSdk/prefab/uiRewardVideo",
_uiBannerPath: "lwSdk/prefab/uiBanner",
_uiFeedPath: "lwSdk/prefab/uiFeed",
_uiInterPath: "lwSdk/prefab/uiInteraction",
_uiSplashPath: "lwSdk/prefab/uiSplash"
},
ctor: function() {},
setRewardID: function(e) {
this._strRewardID = e;
},
setBannerID: function(e) {
this._strBannerID = e;
},
setFeedID: function(e) {
this._strFeedID = e;
},
setSplashID: function(e) {
this._strSplashID = e;
},
setInteractionID: function(e) {
this._strInterID = e;
},
loadRewardAd: function() {
this.loadAd(this._strRewardID, this._uiRewardVideoPath);
},
showRewardAd: function(e, t) {
this._videoSucsCallback = e;
this._videoFailCallback = t;
this.showAd(this._strRewardID, this._uiRewardVideoPath, t);
},
loadAd: function(e, t, i, n) {
var a = this;
if (e) {
var s = new o();
s.set("position_id", e);
s.getAdConfig(function(e) {
s.setAdDatas(e);
a.createUI(t, function(e) {
e.setAdData(s);
i ? i() : s.perloadVideo();
});
}, function(e) {
n && n(e);
var t = e && e.message;
if (!t) try {
t = JSON.stringify(e);
} catch (i) {
t = "服务器返回未知错误";
a.log(t);
a.log(e);
}
a.tip(t);
});
} else this.log("loadAd 广告id 为空");
},
showAd: function(e, t, i) {
var n = this;
this.findUI(t) ? this.showUI(t) : this.loadAd(e, t, function() {
n.showUI(t);
}, i);
},
onRewardSuc: function() {
this._videoSucsCallback && this._videoSucsCallback();
},
onRewardFail: function() {
this._videoFailCallback && this._videoFailCallback();
},
loadBanner: function() {
this.loadAd(this._strBannerID, this._uiBannerPath);
},
showBanner: function() {
this.showAd(this._strBannerID, this._uiBannerPath);
},
hideBanner: function() {
this.closeUI(this._uiBannerPath);
},
loadSplashAd: function() {
this.showAd(this._strSplashID, this._uiSplashPath);
},
showFeed: function() {
this.showAd(this._strFeedID, this._uiFeedPath);
},
hideFeed: function() {
this.closeUI(this._uiFeedPath);
},
loadInteractionAd: function() {
this.showAd(this._strInterID, this._uiInterPath);
},
showDemo: function() {
this.showUI("lwSdk/prefab/uiAdDemo", function(e) {
var t = cc.find("LayerDlg", cc.Canvas.instance.node);
e.node.parent = t;
});
},
showUI: function(e, t) {
var i = this.findUI(e);
if (cc.isValid(i)) {
i.active = !0;
t && t();
} else this.createUI(e, function(e) {
if (e) {
e.node.active = !0;
t && t(e);
}
});
},
createUI: function(e, t) {
var i = this, n = cc.find("AdDlg", cc.Canvas.instance.node);
if (!cc.isValid(n)) {
(n = new cc.Node("AdDlg")).setContentSize(720, 1280);
n.parent = cc.Canvas.instance.node;
var o = n.addComponent(cc.Widget);
o.top = 0;
o.bottom = 0;
o._alignFlags = 5;
}
if (this.openingUI[e]) this.log("窗口正在打开中:" + e); else if (this.findUI(e)) this.log("窗口已经打开:" + e); else {
this.openingUI[e] = !0;
var a = function(i) {
if (this.openingUI[e]) {
var n = i.getComponent("uiBaseLwAd") || i.getComponent("baseNode");
t && t(n);
this.openingUI[e] = null;
} else cc.isValid(i) && i.destroy();
}.bind(this), s = this.findUI(e);
if (cc.isValid(s)) {
if (!s.active) {
a(s);
this.log("已打开的界面,重置设置数据:" + e);
return;
}
this.log("不可重复打开:" + e);
} else cc.loader.loadRes(e, function(t, o) {
if (t) {
i.openingUI[e] = null;
cc.error(t.message || t);
} else {
var s = cc.instantiate(o);
s.active = !1;
s.parent = n;
s.pathName = e;
i.uiList.push(s);
a(s);
}
});
}
},
closeUI: function(e) {
"string" == typeof e && this.openingUI[e] && (this.openingUI[e] = !1);
for (var t = this.uiList.length - 1; t >= 0; t--) {
var i = this.uiList[t];
if (i && (i.pathName === e || "object" == ("undefined" == typeof e ? "undefined" : n(e)) && i === e.node)) {
i.destroy();
this.openingUI[i.pathName] = !1;
this.uiList.splice(t, 1);
return;
}
}
this.log("lwAdSdk.closeUI fail not found ui " + e);
},
findUI: function(e) {
for (var t = this.uiList.length - 1; t >= 0; t--) {
var i = this.uiList[t];
if (cc.isValid(i) && i.pathName === e) return i;
}
},
log: function() {
for (var e = arguments.length, t = Array(e), i = 0; i < e; i++) t[i] = arguments[i];
console.log("LwAdSdk:", t);
},
tip: function(e) {
gWordMgr && gWordMgr.showTip ? gWordMgr.showTip(e) : this.log(e);
}
});
window.LWADSDK = new a();
cc._RF.pop();
}, {
baseAdData: "baseAdData",
baseData: "baseData"
} ],
main: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "e36ddLYsmxIGLbmeBiigL8k", "main");
cc.Class({
extends: ui.baseLayer,
properties: {
updateNode: cc.Node
},
onLoad: function() {
webData.msgSendRecore(G_WINDOW_FROM.INIT);
util.frameResize();
G_COM.G_HEIGHT = cc.Canvas.instance.node.getContentSize().height;
this.init();
this.step1IsFeatures();
},
init: function() {
webData.init();
pageData.init();
nativeData.init();
},
step0ToOpenVideo: function() {
pageData.msgGetGameConfig();
pageData.msgGetCustomerConfig();
pageData.msgGetTurnTableConfig();
var e = nativeData.hasSplashAd();
console.log("[登录0]打开开屏广告", e);
if (e) {
var t = gameData.readValue("firstEnter");
console.log("[登录0]是否打开开屏广告", t);
if (t) {
console.log("[登录0]打开开屏广告");
nativeData.loadSplashAd();
} else this.step2ToHotUpdate();
} else this.step2ToHotUpdate();
},
step1IsFeatures: function() {
var e = nativeData.isFeatures();
console.log("[登录1]FETURE", e);
if (e) cc.game.end(); else {
webData.msgSendRecore(G_WINDOW_FROM.FEATURE);
this.step0ToOpenVideo();
}
},
step2ToHotUpdate: function() {
var e = this;
webData.msgSendRecore(G_WINDOW_FROM.SPLASH);
gameData.set("firstEnter", !0);
gameData.storeValue("firstEnter");
var t = nativeData.getLocalOpenUpdate();
console.log("[登录2]开始热更新", t);
pageData.msgOpenUpdate(function(i) {
console.log("[登录2]是否打开远程热更新", i);
if (i || 2 == t) {
var n = e.updateNode.getComponent("uiUpdate");
n.toHotUpdate();
n.onUpdateFinish(function() {
e.updateNode.destroy();
e.step3ToOpenStop();
});
} else e.step3ToOpenStop();
});
},
step3ToOpenStop: function() {
this.initExtChannel();
webData.msgSendRecore(G_WINDOW_FROM.UPDATE);
console.log("[登录3]打开停服");
pageData.msgOpenStop() && this.step4TowxLogin();
},
enterHall: function() {
webData.msgSendRecore(G_WINDOW_FROM.REGISTER);
console.log("[进入主界面]");
UICtrl.closeUI("uiFrame/uiWXLogin");
UICtrl.openUI("uiFrame/uiHall");
},
step4TowxLogin: function() {
webData.msgSendRecore(G_WINDOW_FROM.STOP);
var e = gameData.readValue("openid");
if (e && "" != e && "undefined" != e) {
gameData.set("openid", e);
var t = gameData.readValue("headWeb");
gameData.set("headWeb", t);
var i = gameData.readValue("nickname");
gameData.set("nickname", i);
console.log("[读取出来的名字头像]", t, i);
webData.toLoginGame(e);
} else {
console.log("[进入微信授权界面]");
UICtrl.openUI("uiFrame/uiWXLogin");
}
},
start: function() {
this.preload();
},
preload: function() {
util.loadCustomResources(void 0, [ "prefab/uiFrame", "prefab/uiGame" ]);
},
initExtChannel: function() {
var e = nativeData.getChannelCode();
gameData.lChannel = e;
console.log("[初始化]渠道", e);
2 != e && 4 != e && 5 != e || (G_FRAME.YYB_VERSION = !0);
5 == e && (this.lbl_notice.active = !1);
}
});
cc._RF.pop();
}, {} ],
md5: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "ca368pT8ehOhZoE9omZGgNl", "md5");
var n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
return typeof e;
} : function(e) {
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
};
(function(e) {
function i(e, t) {
var i = (65535 & e) + (65535 & t);
return (e >> 16) + (t >> 16) + (i >> 16) << 16 | 65535 & i;
}
function o(e, t) {
return e << t | e >>> 32 - t;
}
function a(e, t, n, a, s, r) {
return i(o(i(i(t, e), i(a, r)), s), n);
}
function s(e, t, i, n, o, s, r) {
return a(t & i | ~t & n, e, t, o, s, r);
}
function r(e, t, i, n, o, s, r) {
return a(t & n | i & ~n, e, t, o, s, r);
}
function c(e, t, i, n, o, s, r) {
return a(t ^ i ^ n, e, t, o, s, r);
}
function l(e, t, i, n, o, s, r) {
return a(i ^ (t | ~n), e, t, o, s, r);
}
function u(e, t) {
e[t >> 5] |= 128 << t % 32;
e[14 + (t + 64 >>> 9 << 4)] = t;
var n, o, a, u, h, d = 1732584193, g = -271733879, f = -1732584194, p = 271733878;
for (n = 0; n < e.length; n += 16) {
o = d;
a = g;
u = f;
h = p;
g = l(g = l(g = l(g = l(g = c(g = c(g = c(g = c(g = r(g = r(g = r(g = r(g = s(g = s(g = s(g = s(g, f = s(f, p = s(p, d = s(d, g, f, p, e[n], 7, -680876936), g, f, e[n + 1], 12, -389564586), d, g, e[n + 2], 17, 606105819), p, d, e[n + 3], 22, -1044525330), f = s(f, p = s(p, d = s(d, g, f, p, e[n + 4], 7, -176418897), g, f, e[n + 5], 12, 1200080426), d, g, e[n + 6], 17, -1473231341), p, d, e[n + 7], 22, -45705983), f = s(f, p = s(p, d = s(d, g, f, p, e[n + 8], 7, 1770035416), g, f, e[n + 9], 12, -1958414417), d, g, e[n + 10], 17, -42063), p, d, e[n + 11], 22, -1990404162), f = s(f, p = s(p, d = s(d, g, f, p, e[n + 12], 7, 1804603682), g, f, e[n + 13], 12, -40341101), d, g, e[n + 14], 17, -1502002290), p, d, e[n + 15], 22, 1236535329), f = r(f, p = r(p, d = r(d, g, f, p, e[n + 1], 5, -165796510), g, f, e[n + 6], 9, -1069501632), d, g, e[n + 11], 14, 643717713), p, d, e[n], 20, -373897302), f = r(f, p = r(p, d = r(d, g, f, p, e[n + 5], 5, -701558691), g, f, e[n + 10], 9, 38016083), d, g, e[n + 15], 14, -660478335), p, d, e[n + 4], 20, -405537848), f = r(f, p = r(p, d = r(d, g, f, p, e[n + 9], 5, 568446438), g, f, e[n + 14], 9, -1019803690), d, g, e[n + 3], 14, -187363961), p, d, e[n + 8], 20, 1163531501), f = r(f, p = r(p, d = r(d, g, f, p, e[n + 13], 5, -1444681467), g, f, e[n + 2], 9, -51403784), d, g, e[n + 7], 14, 1735328473), p, d, e[n + 12], 20, -1926607734), f = c(f, p = c(p, d = c(d, g, f, p, e[n + 5], 4, -378558), g, f, e[n + 8], 11, -2022574463), d, g, e[n + 11], 16, 1839030562), p, d, e[n + 14], 23, -35309556), f = c(f, p = c(p, d = c(d, g, f, p, e[n + 1], 4, -1530992060), g, f, e[n + 4], 11, 1272893353), d, g, e[n + 7], 16, -155497632), p, d, e[n + 10], 23, -1094730640), f = c(f, p = c(p, d = c(d, g, f, p, e[n + 13], 4, 681279174), g, f, e[n], 11, -358537222), d, g, e[n + 3], 16, -722521979), p, d, e[n + 6], 23, 76029189), f = c(f, p = c(p, d = c(d, g, f, p, e[n + 9], 4, -640364487), g, f, e[n + 12], 11, -421815835), d, g, e[n + 15], 16, 530742520), p, d, e[n + 2], 23, -995338651), f = l(f, p = l(p, d = l(d, g, f, p, e[n], 6, -198630844), g, f, e[n + 7], 10, 1126891415), d, g, e[n + 14], 15, -1416354905), p, d, e[n + 5], 21, -57434055), f = l(f, p = l(p, d = l(d, g, f, p, e[n + 12], 6, 1700485571), g, f, e[n + 3], 10, -1894986606), d, g, e[n + 10], 15, -1051523), p, d, e[n + 1], 21, -2054922799), f = l(f, p = l(p, d = l(d, g, f, p, e[n + 8], 6, 1873313359), g, f, e[n + 15], 10, -30611744), d, g, e[n + 6], 15, -1560198380), p, d, e[n + 13], 21, 1309151649), f = l(f, p = l(p, d = l(d, g, f, p, e[n + 4], 6, -145523070), g, f, e[n + 11], 10, -1120210379), d, g, e[n + 2], 15, 718787259), p, d, e[n + 9], 21, -343485551);
d = i(d, o);
g = i(g, a);
f = i(f, u);
p = i(p, h);
}
return [ d, g, f, p ];
}
function h(e) {
var t, i = "", n = 32 * e.length;
for (t = 0; t < n; t += 8) i += String.fromCharCode(e[t >> 5] >>> t % 32 & 255);
return i;
}
function d(e) {
var t, i = [];
i[(e.length >> 2) - 1] = void 0;
for (t = 0; t < i.length; t += 1) i[t] = 0;
var n = 8 * e.length;
for (t = 0; t < n; t += 8) i[t >> 5] |= (255 & e.charCodeAt(t / 8)) << t % 32;
return i;
}
function g(e) {
return h(u(d(e), 8 * e.length));
}
function f(e, t) {
var i, n, o = d(e), a = [], s = [];
a[15] = s[15] = void 0;
o.length > 16 && (o = u(o, 8 * e.length));
for (i = 0; i < 16; i += 1) {
a[i] = 909522486 ^ o[i];
s[i] = 1549556828 ^ o[i];
}
n = u(a.concat(d(t)), 512 + 8 * t.length);
return h(u(s.concat(n), 640));
}
function p(e) {
var t, i, n = "";
for (i = 0; i < e.length; i += 1) {
t = e.charCodeAt(i);
n += "0123456789abcdef".charAt(t >>> 4 & 15) + "0123456789abcdef".charAt(15 & t);
}
return n;
}
function m(e) {
return unescape(encodeURIComponent(e));
}
function _(e) {
return g(m(e));
}
function v(e) {
return p(_(e));
}
function y(e, t) {
return f(m(e), m(t));
}
function D(e, t) {
return p(y(e, t));
}
function b(e, t, i) {
return t ? i ? y(t, e) : D(t, e) : i ? _(e) : v(e);
}
"function" == typeof define && define.amd ? define(function() {
return b;
}) : "object" === ("undefined" == typeof t ? "undefined" : n(t)) && t.exports ? t.exports = b : e.md5 = b;
})(void 0);
cc._RF.pop();
}, {} ],
monsterCsvData: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "745eaq9hNBMXpWsevBIVoe5", "monsterCsvData");
var n = e("csvData"), o = cc.Class({
extends: n,
name: "monsterCsvData",
properties: {
_fileName: {
override: !0,
default: "monster"
}
},
getMonSpdByID: function(e) {
return this.getValueByIDKey(e, "walkspeed");
},
getMonHPByID: function(e) {
return this.getValueByIDKey(e, "HP");
},
getMonIconByID: function(e) {
return this.getValueByIDKey(e, "icon");
},
getMonGoldByID: function(e) {
return parseInt(this.getValueByIDKey(e, "dropgold"));
}
});
window.monsterCsvData = new o();
cc._RF.pop();
}, {
csvData: "csvData"
} ],
monsterDeath: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "53663WeuQZAmrxZL/LaMKZI", "monsterDeath");
cc.Class({
extends: cc.Component,
properties: {},
start: function() {},
init: function(e, t, i) {
var n = this;
this.node.scaleX = t;
this.node.scaleY = i;
this.initUI(e);
this.scheduleOnce(function() {
var e = n.node.position.add(cc.v2(0, -30));
gWordMgr.showArtEffect("effect/guaishousiwang", n.node.parent, {
pos: e,
zIndex: 1
});
n.node.destroy();
}, .3);
},
initUI: function(e) {
var t = "monster/" + e + "/" + e + "_ske", i = "monster/" + e + "/" + e + "_tex", n = this.node.getComponent(dragonBones.ArmatureDisplay);
n.dragonAsset = cc.loader.getRes(t, dragonBones.DragonBonesAsset);
n.dragonAtlasAsset = cc.loader.getRes(i, dragonBones.DragonBonesAtlasAsset);
n.armatureName = "armatureName";
}
});
cc._RF.pop();
}, {} ],
nativeData: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "efb39uc5IlPzI9Glyof6xDx", "nativeData");
var n;
function o(e, t, i) {
t in e ? Object.defineProperty(e, t, {
value: i,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = i;
return e;
}
var a = (o(n = {}, 1, cc.sys.os == cc.sys.OS_IOS ? "iOSADIPA" : "com/lwhy/dbxgs/TopOnSDK"), 
o(n, 2, cc.sys.os == cc.sys.OS_IOS ? "iOSGDTIPA" : "com/lwhy/dbxgs/TopOnSDK"), o(n, 3, cc.sys.os == cc.sys.OS_IOS ? "iOSGDTIPA" : "com/lwhy/dbxgs/TopOnSDK"), 
o(n, 4, cc.sys.os == cc.sys.OS_IOS ? "iOSGDTIPA" : "com/lwhy/dbxgs/TopOnSDK"), n), s = e("baseData"), r = cc.Class({
extends: s,
name: "nativeData",
properties: {
sucsCallback: void 0,
failCallback: void 0,
firstCoverInstall: !1,
shareIndex: 0
},
init: function() {
console.log("[nativeData]init");
this.setFirstLogin();
},
openShare: function(e, t, i) {
cc.sys.os == cc.sys.OS_IOS ? jsb.reflection.callStaticMethod("iOSAPIForOtherPlatform", "showUMMenuWith:title:des:", e, t, i) : cc.sys.os == cc.sys.OS_ANDROID && jsb.reflection.callStaticMethod("com/lwhy/dbxgs/AppActivity", "openShare", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", e, t, i);
},
openShareImg: function(e, t) {
if (cc.sys.os == cc.sys.OS_IOS) {
console.log("ios分享图片");
jsb.reflection.callStaticMethod("iOSAPIForOtherPlatform", "showUMMenuWithImageData:", t);
} else cc.sys.os == cc.sys.OS_ANDROID && jsb.reflection.callStaticMethod("com/lwhy/dbxgs/AppActivity", "openShareImg" + e, "(Ljava/lang/String;)V", t);
},
toShareWX: function(e, t, i) {
cc.sys.os == cc.sys.OS_IOS ? jsb.reflection.callStaticMethod("iOSAPIForOtherPlatform", "shareWXWith:title:des:", e, t, i) : cc.sys.os == cc.sys.OS_ANDROID && jsb.reflection.callStaticMethod("com/lwhy/dbxgs/AppActivity", "toShareWX", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", e, t, i);
},
toShareWXCricle: function(e, t) {
cc.sys.os == cc.sys.OS_IOS ? jsb.reflection.callStaticMethod("iOSAPIForOtherPlatform", "shareWXTimeLineWith:title:", e, t) : cc.sys.os == cc.sys.OS_ANDROID && jsb.reflection.callStaticMethod("com/lwhy/dbxgs/AppActivity", "toShareWXCricle", "(Ljava/lang/String;Ljava/lang/String;)V", e, t);
},
toShareQQ: function(e, t, i) {
cc.sys.os == cc.sys.OS_IOS ? jsb.reflection.callStaticMethod("iOSAPIForOtherPlatform", "shareQQWith:title:des:", e, t, i) : cc.sys.os == cc.sys.OS_ANDROID && jsb.reflection.callStaticMethod("com/lwhy/dbxgs/AppActivity", "toShareQQ", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", e, t, i);
},
toShareQQZone: function(e, t, i) {
cc.sys.os == cc.sys.OS_IOS ? jsb.reflection.callStaticMethod("iOSAPIForOtherPlatform", "shareQQZoneWith:title:des:", e, t, i) : cc.sys.os == cc.sys.OS_ANDROID && jsb.reflection.callStaticMethod("com/lwhy/dbxgs/AppActivity", "toShareQQZone", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", e, t, i);
},
toShareSina: function(e, t, i, n) {
cc.sys.os == cc.sys.OS_IOS ? jsb.reflection.callStaticMethod("iOSAPIForOtherPlatform", "shareSinaWith:title:des:text:", e, t, i, n) : cc.sys.os == cc.sys.OS_ANDROID && jsb.reflection.callStaticMethod("com/lwhy/dbxgs/AppActivity", "toShareSina", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", e, t, i, n);
},
loginWX: function() {
cc.sys.os == cc.sys.OS_IOS ? jsb.reflection.callStaticMethod("iOSAPIForOtherPlatform", "loginWithWX") : cc.sys.os == cc.sys.OS_ANDROID && jsb.reflection.callStaticMethod("com/lwhy/dbxgs/AppActivity", "loginWX", "()V");
},
onLoginWX: function(e) {
console.log("loginwx suc");
console.log("[wlb]", e.openid, e.name, e.access_token, e.iconurl, e.city);
gameData.set("openid", e.openid);
gameData.storeValue("openid");
gameData.set("headWeb", e.iconurl);
gameData.storeValue("headWeb");
gameData.set("nickname", e.name);
gameData.storeValue("nickname");
gameData.set("unionid", e.unionid);
gameData.storeValue("unionid");
gameData.set("token", e.access_token);
gameData.storeValue("token");
gameData.set("city", e.city);
gameData.storeValue("city");
webData.toLoginGame(e.openid);
},
loginApple: function() {
cc.sys.os == cc.sys.OS_IOS && jsb.reflection.callStaticMethod("HandleSignInWithAppleModel", "loginWithApple");
},
onLoginApple: function(e) {
var t = e.appleToken, i = e.appleUserId;
console.log("appleToken:" + t + "/nappleUer" + i);
webData.appleCallBackCode(i, t, function(e) {
gameData.set("token", e.data.api_token);
gameData.storeValue("token");
gameData.set("userid", e.data.user_id);
gameData.storeValue("userid");
gameData.set("webtoken", e.data.api_token);
gameData.storeValue("webtoken");
webData.getWebLoginData(e);
console.log("[进入主界面]");
gMainMgr.enterHall();
}, function() {
util.showTip(e.message);
});
},
showIOSComent: function() {
util.randomRange(1, 100) >= gCloundMgr.cIOSComent || cc.sys.os == cc.sys.OS_IOS && jsb.reflection.callStaticMethod("iOSSystemAPI", "systemComent");
},
isInstallWX: function() {
return cc.sys.os != cc.sys.OS_IOS || jsb.reflection.callStaticMethod("iOSAPIForOtherPlatform", "isInstallWX");
},
isInstallQQ: function() {
return cc.sys.os != cc.sys.OS_IOS || jsb.reflection.callStaticMethod("iOSAPIForOtherPlatform", "isInstallQQ");
},
gameDidLoad: function() {
cc.sys.os == cc.sys.OS_IOS && jsb.reflection.callStaticMethod("publicAPI", "gameDidLoad");
},
gameRegister: function() {
cc.sys.os == cc.sys.OS_IOS || cc.sys.os == cc.sys.OS_ANDROID && jsb.reflection.callStaticMethod("com/lwhy/dbxgs/PDDSDK", "onRegister", "()V");
},
setBannerID: function(e, t) {
cc.sys.os == cc.sys.OS_IOS ? jsb.reflection.callStaticMethod(a[1], "setBannerID:", e) : cc.sys.os == cc.sys.OS_ANDROID && jsb.reflection.callStaticMethod(a[1], "setBannerID", "(Ljava/lang/String;)V", e);
},
showBanner: function() {
cc.sys.os == cc.sys.OS_IOS ? jsb.reflection.callStaticMethod(a[1], "showBanner") : cc.sys.os == cc.sys.OS_ANDROID && jsb.reflection.callStaticMethod(a[1], "showBanner", "()V");
},
hideBanner: function() {
cc.sys.os == cc.sys.OS_IOS ? jsb.reflection.callStaticMethod(a[1], "hideBanner") : cc.sys.os == cc.sys.OS_ANDROID && jsb.reflection.callStaticMethod(a[1], "hideBanner", "()V");
},
hasSplashAd: function() {
if (cc.sys.os == cc.sys.OS_IOS) return jsb.reflection.callStaticMethod(a[1], "hasSplashAd");
if (cc.sys.os == cc.sys.OS_ANDROID) {
return jsb.reflection.callStaticMethod(a[1], "hasSplashAd", "()Z");
}
return !1;
},
loadSplashAd: function() {
cc.sys.os == cc.sys.OS_IOS ? jsb.reflection.callStaticMethod(a[1], "loadSplashAd") : cc.sys.os == cc.sys.OS_ANDROID && jsb.reflection.callStaticMethod(a[1], "loadSplashAd", "()V");
},
onSplashFinish: function() {
console.log("[开屏广告结束返回]");
cc.Canvas.instance.node.getComponent("main").step2ToHotUpdate();
},
setInteractionID: function(e, t) {
cc.sys.os == cc.sys.OS_IOS ? jsb.reflection.callStaticMethod(a[1], "setInteractionID:", e) : cc.sys.os == cc.sys.OS_ANDROID && jsb.reflection.callStaticMethod(a[1], "setInteractionID", "(Ljava/lang/String;)V", e);
},
loadInteractionAd: function() {
cc.sys.os == cc.sys.OS_IOS ? jsb.reflection.callStaticMethod(a[1], "loadInteractionAd") : cc.sys.os == cc.sys.OS_ANDROID && jsb.reflection.callStaticMethod(a[1], "loadInteractionAd", "()V");
},
showRewardAd: function(e, t) {
this.sucsCallback = e;
this.failCallback = t;
gameData.fromAD = !0;
cc.sys.os == cc.sys.OS_IOS ? jsb.reflection.callStaticMethod(a[1], "showRewardAd") : cc.sys.os == cc.sys.OS_ANDROID && jsb.reflection.callStaticMethod(a[1], "showRewardAd", "()V");
cc.audioEngine.stopAll();
audioData.stopAllSound(!0);
},
loadRewardAd: function() {
cc.sys.os == cc.sys.OS_IOS ? jsb.reflection.callStaticMethod(a[1], "preLoadRewardAD") : cc.sys.os == cc.sys.OS_ANDROID && jsb.reflection.callStaticMethod(a[1], "loadRewardAd", "()V");
},
setFeedID: function(e) {
cc.sys.os == cc.sys.OS_IOS ? jsb.reflection.callStaticMethod(a[1], "setFeedID:", e) : cc.sys.os == cc.sys.OS_ANDROID && jsb.reflection.callStaticMethod(a[1], "setFeedID", "(Ljava/lang/String;)V", e);
},
showFeed: function() {
cc.sys.os == cc.sys.OS_IOS ? jsb.reflection.callStaticMethod(a[1], "showFeed") : cc.sys.os == cc.sys.OS_ANDROID && jsb.reflection.callStaticMethod(a[1], "showFeed", "()V");
},
hideFeed: function() {
cc.sys.os == cc.sys.OS_IOS ? jsb.reflection.callStaticMethod("iOSADIPA", "hideFeed") : cc.sys.os == cc.sys.OS_ANDROID && jsb.reflection.callStaticMethod(a[1], "hideFeed", "()V");
},
showFullScreenAd: function(e) {
gameData.fromAD = !0;
webData.msgSendRecore(G_WINDOW_FROM.FULL_SCREEN_OPEN);
this.fullSucsCallback = e;
cc.sys.os == cc.sys.OS_IOS ? jsb.reflection.callStaticMethod([ a[1] ], "showFullScreenAd") : cc.sys.os == cc.sys.OS_ANDROID && jsb.reflection.callStaticMethod([ a[1] ], "showFullScreenAd", "()V");
},
onFullScreenAdBack: function() {
console.log("[全屏视频返回]", this.fullSucsCallback);
this.fullSucsCallback && this.fullSucsCallback();
this.fullSucsCallback = null;
},
onFullScreenAdEnd: function() {
console.log("[全屏视频看完返回]");
webData.msgSendRecore(G_WINDOW_FROM.FULL_SCREEN_WATCHED);
},
onWatchVideoSuc: function(e) {
console.log("[视频成功返回]", e.network_placement_id, e.network_firm_id, e.adsource_id);
this.network_placement_id = e.network_placement_id, this.network_firm_id = e.network_firm_id;
this.sucsCallback && audioData.resumeAllSound(!0);
this.sucsCallback && this.sucsCallback();
this.sucsCallback = null;
this.failCallback = null;
},
onWatchVideoFail: function() {
console.log("[视频失败返回]");
this.failCallback && audioData.resumeAllSound(!0);
this.failCallback && this.failCallback();
this.sucsCallback = null;
this.failCallback = null;
},
setRewardID: function(e) {
if (cc.sys.os == cc.sys.OS_IOS) {
jsb.reflection.callStaticMethod(a[1], "setRewardID:userID:", 100, e);
} else cc.sys.os == cc.sys.OS_ANDROID && jsb.reflection.callStaticMethod(a[1], "setRewardID", "(Ljava/lang/String;)V", e);
},
getChannelCode: function() {
var e = 1;
cc.sys.os == cc.sys.OS_IOS ? e = jsb.reflection.callStaticMethod("iOSOpenInstallAPI", "getChannel") : cc.sys.os == cc.sys.OS_ANDROID && (e = jsb.reflection.callStaticMethod("com/lwhy/dbxgs/AppActivity", "getChannel", "()Ljava/lang/String;"));
"0" == e && (e = 5);
e || (e = 1);
return parseInt(e);
},
getLocalOpenUpdate: function() {
var e = 1;
cc.sys.os == cc.sys.OS_IOS || cc.sys.os == cc.sys.OS_ANDROID && (e = jsb.reflection.callStaticMethod("com/lwhy/dbxgs/AppActivity", "getOpenUpdate", "()Ljava/lang/String;"));
e || (e = 1);
return parseInt(e);
},
getDerviceID: function() {
var e = 0;
cc.sys.os == cc.sys.OS_IOS ? e = jsb.reflection.callStaticMethod("iOSSystemAPI", "getDerviceID") : cc.sys.os == cc.sys.OS_ANDROID && (e = jsb.reflection.callStaticMethod("com/lwhy/dbxgs/AppActivity", "getDerviceID", "()Ljava/lang/String;"));
return e;
},
getImei: function(e) {
var t = "";
cc.sys.os == cc.sys.OS_IOS ? t = jsb.reflection.callStaticMethod("iOSSystemAPI", "getiOSIMEI") : cc.sys.os == cc.sys.OS_ANDROID && (t = jsb.reflection.callStaticMethod("com/lwhy/dbxgs/SysTools", "getDeviceId", "(I)Ljava/lang/String;", e));
return t;
},
getMac: function() {
var e = "02:00:00:00:00:00";
cc.sys.os == cc.sys.OS_IOS || cc.sys.os == cc.sys.OS_ANDROID && (e = jsb.reflection.callStaticMethod("com/lwhy/dbxgs/AppActivity", "getMAC", "()Ljava/lang/String;"));
return e;
},
getMeid: function() {
var e = "";
cc.sys.os == cc.sys.OS_IOS || cc.sys.os == cc.sys.OS_ANDROID && (e = jsb.reflection.callStaticMethod("com/lwhy/dbxgs/SysTools", "getMeId", "()Ljava/lang/String;"));
return e;
},
getLocalVersion: function() {
var e = void 0;
cc.sys.os == cc.sys.OS_IOS ? e = jsb.reflection.callStaticMethod("iOSSystemAPI", "getLocalVersion") : cc.sys.os == cc.sys.OS_ANDROID && (e = jsb.reflection.callStaticMethod("com/lwhy/dbxgs/AppActivity", "getVer", "()Ljava/lang/String;"));
return e;
},
phoneVibrate: function(e) {
cc.sys.os == cc.sys.OS_IOS ? jsb.reflection.callStaticMethod("iOSSystemAPI", "phoneVibrate:", e) : cc.sys.os == cc.sys.OS_ANDROID && jsb.reflection.callStaticMethod("com/lwhy/dbxgs/AppActivity", "phoneVibrate", "(I)V", e);
},
getBindData: function() {
var e = 0, t = "";
cc.sys.os == cc.sys.OS_IOS ? t = jsb.reflection.callStaticMethod("iOSOpenInstallAPI", "getBindData") : cc.sys.os == cc.sys.OS_ANDROID && (t = jsb.reflection.callStaticMethod("com/lwhy/dbxgs/OpenInstallSDK", "getBindData", "()Ljava/lang/String;"));
try {
var i = JSON.parse(t);
i.shareImage && (this.shareIndex = parseInt(i.shareImage));
if (i.invitation) {
e = parseInt(i.invitation);
console.log("[获取到openinstall数据]", e);
return e;
}
return 0;
} catch (e) {
return 0;
}
},
checkAppInstalled: function(e) {
var t = !1;
cc.sys.os == cc.sys.OS_IOS || cc.sys.os == cc.sys.OS_ANDROID && (t = jsb.reflection.callStaticMethod("com/lwhy/dbxgs/SysTools", "checkAppInstalled", "(Ljava/lang/String;)Z", e));
return t;
},
InstallApk: function(e) {
cc.sys.os == cc.sys.OS_IOS || cc.sys.os == cc.sys.OS_ANDROID && jsb.reflection.callStaticMethod("com/lwhy/dbxgs/SysTools", "installapk", "(Ljava/lang/String;)V", e);
},
startApp: function(e) {
cc.sys.os == cc.sys.OS_IOS || cc.sys.os == cc.sys.OS_ANDROID && jsb.reflection.callStaticMethod("com/lwhy/dbxgs/SysTools", "startApp", "(Ljava/lang/String;)V", e);
},
InstallAPP: function(e, t, i, n) {
var o = this;
this._downloadItems = this._downloadItems || {};
this._downloadItems[e] = {};
var a = this._downloadItems[e], s = jsb.fileUtils.getWritablePath() + e.match(/[^\/]+\.apk/);
console.log("download", "开始下载" + e);
if (!a.downloader) {
a.downloader = new jsb.Downloader();
a.downloader.setOnFileTaskSuccess(function() {
console.log("download", "downloadAPK 下载成功");
setTimeout(function() {
o.InstallApk(s);
i && i(s);
}, .1);
});
a.downloader.setOnTaskProgress(function(e, i, n, o) {
console.log("download", "downloadAPK 本次完成大小 = " + i);
var a = (n / o * 100).toFixed(1);
t && t(a);
});
a.downloader.setOnTaskError(function() {
console.log("download", "downloadAPK 下载失败");
n && n();
});
}
a.downloader.createDownloadFileTask(e, s, "");
},
setFirstLogin: function() {
if (cc.sys.os == cc.sys.OS_IOS) ; else if (cc.sys.os == cc.sys.OS_ANDROID) {
var e = jsb.reflection.callStaticMethod("com/lwhy/dbxgs/AppActivity", "getPackageFirstInstallTime", "()Ljava/lang/String;"), t = jsb.reflection.callStaticMethod("com/lwhy/dbxgs/AppActivity", "getPackageLastUpdateTime", "()Ljava/lang/String;");
console.log("[nativeData]getPackageFirstInstallTime", e);
console.log("[nativeData]getPackageLastUpdateTime", t);
var i = cc.sys.localStorage.getItem("fInstallTime");
console.log("[nativeData]1保存的第一次安装时间", i);
if (!i) {
cc.sys.localStorage.setItem("fInstallTime", e);
i = e;
console.log("[nativeData]2保存的第一次安装时间", i);
}
console.log("[nativeData]3保存的第一次安装时间", i);
this.firstCoverInstall = !1;
if (i != t) {
this.firstCoverInstall = !0;
console.log("[nativeData]第一次覆盖安装打开");
cc.sys.localStorage.setItem("fInstallTime", t);
} else console.log("[nativeData]不是覆盖安装打开");
}
},
isFeatures: function() {
var e = !1;
cc.sys.os == cc.sys.OS_IOS || cc.sys.os == cc.sys.OS_ANDROID && (e = jsb.reflection.callStaticMethod("com/lwhy/dbxgs/SysTools", "isFeatures", "()Z"));
return e;
},
saveTextureToLocal: function(e, t) {
if (cc.sys.os == cc.sys.OS_IOS) {
jsb.reflection.callStaticMethod("publicAPI", "getDocumentImageSaveToPhoto:", e);
this.saveCallback = t;
} else if (cc.sys.os == cc.sys.OS_ANDROID) {
t(jsb.reflection.callStaticMethod("com/lwhy/dbxgs/SysTools", "saveTextureToLocal", "(Ljava/lang/String;)Ljava/lang/String;", e));
}
},
saveTextureIosCallback: function(e) {
this.saveCallback(e);
this.saveCallback = null;
},
toCopy: function(e) {
cc.sys.os == cc.sys.OS_IOS ? jsb.reflection.callStaticMethod("iOSSystemAPI", "toCopy:", e) : cc.sys.os == cc.sys.OS_ANDROID && jsb.reflection.callStaticMethod("com/lwhy/dbxgs/AppActivity", "toCopy", "(Ljava/lang/String;)V", e);
},
setGeTuiTag: function(e) {
cc.sys.os == cc.sys.OS_IOS || cc.sys.os == cc.sys.OS_ANDROID && jsb.reflection.callStaticMethod("com/lwhy/dbxgs/service/GetuiIntentService", "setTag", "(Ljava/lang/String;)V", e);
},
getOAID: function() {
var e = "";
cc.sys.os == cc.sys.OS_IOS || cc.sys.os == cc.sys.OS_ANDROID && (e = jsb.reflection.callStaticMethod("com/lwhy/dbxgs/OAIDSdk", "getOAID", "()Ljava/lang/String;"));
return e;
},
getAndroidVersion: function() {
var e = 1;
cc.sys.os == cc.sys.OS_IOS || cc.sys.os == cc.sys.OS_ANDROID && (e = jsb.reflection.callStaticMethod("com/lwhy/dbxgs/SysTools", "getAndroidVer", "()Ljava/lang/String;"));
return parseInt(e);
}
});
window.nativeData = new r();
cc._RF.pop();
}, {
baseData: "baseData"
} ],
newMoneyCsvData: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "b5943mTNpZNWYwNPqhZzvw7", "newMoneyCsvData");
var n = e("csvData"), o = cc.Class({
extends: n,
name: "newMoneyCsvData",
properties: {
_fileName: {
override: !0,
default: "5day"
}
}
});
window.newMoneyCsvData = new o();
cc._RF.pop();
}, {
csvData: "csvData"
} ],
nodBtnBreath: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "e63828cYDFN6LZk/1SjGhUU", "nodBtnBreath");
cc.Class({
extends: cc.Component,
properties: {},
start: function() {
this.playBtnBreatheEffect(this.node);
},
playBtnBreatheEffect: function(e) {
if (e) {
var t = e.scaleX, i = e.scaleY;
e.stopAllActions();
e.runAction(cc.repeatForever(cc.sequence(cc.delayTime(.5), cc.scaleTo(.15, 1.3 * t, 1.2 * i), cc.scaleTo(.1, 1 * t, 1 * i), cc.scaleTo(.1, .9 * t, .8 * i), cc.scaleTo(.1, 1 * t, 1 * i), cc.delayTime(.5))));
}
}
});
cc._RF.pop();
}, {} ],
nodeBtnGameBox: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "7ea4aezHxJCf7wYnFzbwwzz", "nodeBtnGameBox");
cc.Class({
extends: ui.baseLayer,
properties: {
withDrawalBtn: cc.Node
},
showGameBox: function() {
if (gCloundMgr.cShowGameBoxLevel >= 100) {
this.node.active = !1;
console.log("[盒子]云控不显示");
this.showWithDrawal();
} else if (gameData.gMaxTower < gCloundMgr.cShowGameBoxLevel) {
this.node.active = !1;
console.log("[盒子]等级不够不显示");
} else if (0 == gameData.gBoxUser) {
console.log("[盒子]不是盒子用户显示");
this.updateGameBox();
} else if (1 == gameData.gBoxUser) {
console.log("[盒子]已经是盒子用户不显示");
this.showWithDrawal();
} else if (2 == gameData.gBoxUser) {
console.log("[盒子]下载了未提现显示");
this.updateGameBox();
} else if (3 == gameData.gBoxUser) {
console.log("[盒子]下载了提现提现了不显示");
this.showWithDrawal();
} else {
console.log("[盒子]其他值也不显示", gameData.gBoxUser);
this.showWithDrawal();
}
},
updateGameBox: function() {
var e = this;
this.node.active = !0;
pageData.msgGetBoxMoneyConfig(function(t) {
e.lbl_gameBox_money.getComponent(cc.Label).string = gameData.gBoxMoney;
});
},
showWithDrawal: function() {
this.node.active = !1;
if (!gameData.gActivityMoneyOpen) {
var e = Math.floor(new Date().getTime() / 1e3);
gameData.set("gActivityMoneyOpen", e);
}
this.withDrawalBtn.getComponent("nodeBtnWithDrawal").showOpenServiceReward();
}
});
cc._RF.pop();
}, {} ],
nodeBtnMoney: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "a2c88qhH99BALnAOpaRn90n", "nodeBtnMoney");
cc.Class({
extends: ui.baseLayer,
properties: {},
start: function() {
var e = this;
this.schedule(function() {
e.updateTip();
}, 10);
gameData.on("moduleTipUpdate", function(t) {
t == G_WINDOW_FROM.LEVEL && e.updateTip();
});
},
updateTip: function() {
gTipsMgr.isGameLevelRedComplete() ? this.img_level_ani.active = !0 : this.img_level_ani.active = !1;
}
});
cc._RF.pop();
}, {} ],
nodeBtnNew: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "7a7f6vh5pFKyq3yJ8HEaXFD", "nodeBtnNew");
cc.Class({
extends: ui.baseLayer,
properties: {},
start: function() {
var e = this;
this.schedule(function() {
e.updateTip();
}, 10);
gameData.on("moduleTipUpdate", function(t) {
t == G_WINDOW_FROM.NEW && e.updateTip();
});
},
updateTip: function() {
gTipsMgr.isNewMoneyComplete() ? this.img_new_ani.active = !0 : this.img_new_ani.active = !1;
}
});
cc._RF.pop();
}, {} ],
nodeBtnRoller: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "25660ZRgrhEg48nkJfFgwKC", "nodeBtnRoller");
cc.Class({
extends: ui.baseLayer,
properties: {},
start: function() {
var e = this, t = this.getComponent(cc.Animation);
gameData.on("gDayTicket", function(i) {
if (gTipsMgr.isRollerComplete()) {
t.play();
e.img_roller_tip.active = !0;
} else {
t.stop();
e.img_roller_tip.active = !1;
}
});
}
});
cc._RF.pop();
}, {} ],
nodeBtnSign: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "256f8j5u3BKL5/gNkwIkAnw", "nodeBtnSign");
cc.Class({
extends: ui.baseLayer,
properties: {},
start: function() {
var e = this;
this.schedule(function() {
e.updateTip();
}, 10);
gameData.on("moduleTipUpdate", function(t) {
t == G_WINDOW_FROM.SIGN && e.updateTip();
});
},
updateTip: function() {
if (gTipsMgr.isSignComplete()) {
this.img_sign_tip.active = !0;
gFunctionMgr.playShake(this.img_sign_tip);
} else {
this.img_sign_tip.stopAllActions();
this.img_sign_tip.active = !1;
}
}
});
cc._RF.pop();
}, {} ],
nodeBtnTask: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "9d2af7DhalAUIfQEDFNegYy", "nodeBtnTask");
cc.Class({
extends: ui.baseLayer,
properties: {},
start: function() {
var e = this;
this.schedule(function() {
e.updateTip();
}, 10);
gameData.on("moduleTipUpdate", function(t) {
t == G_WINDOW_FROM.TASK && e.updateTip();
});
},
updateTip: function() {
if (gTipsMgr.isTaskComplete()) {
this.img_task_tip.active = !0;
gFunctionMgr.playShake(this.img_task_tip);
} else {
this.img_task_tip.stopAllActions();
this.img_task_tip.active = !1;
}
}
});
cc._RF.pop();
}, {} ],
nodeBtnTurntable: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "64fa4TjT8hF0LcZVbAnFaza", "nodeBtnTurntable");
cc.Class({
extends: ui.baseLayer,
properties: {
logoGuoQing: cc.SpriteFrame
},
start: function() {
var e = this;
gameData.on("gGetTurntable", function(t) {
if (t > 0) {
e.flag_turntable_1.active = !1;
e.flag_turntable_2.active = !0;
} else {
e.flag_turntable_1.active = !0;
e.flag_turntable_2.active = !1;
}
});
gCloundMgr.cInGuoQing && (this.node.getComponent(cc.Sprite).spriteFrame = this.logoGuoQing);
},
initShow: function() {
webData.msgGetTurntableInfo();
}
});
cc._RF.pop();
}, {} ],
nodeBtnWithDrawal: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "ec3dfyA0dRMVLRpV01rKG39", "nodeBtnWithDrawal");
cc.Class({
extends: ui.baseLayer,
properties: {
logo2: cc.SpriteFrame,
flag2: cc.SpriteFrame
},
start: function() {},
updateUI: function() {
var e = this;
this.scheduleOnce(function() {
e.updateTip();
}, 10);
gameData.on("moduleTipUpdate", function(t) {
t == G_WINDOW_FROM.WITHDRAWAL && e.updateTip();
});
this.setCloundChange();
},
updateTip: function() {
this.node.active && (gFunctionMgr.getWithDrawalState() ? this.img_withDrawal_ani.active = !0 : this.img_withDrawal_ani.active = !1);
},
setCloundChange: function() {
if (this.node.active && 2 == gCloundMgr.cWithDrawalMoney) {
this.node.getComponent(cc.Sprite).spriteFrame = this.logo2;
this.img_active_2_icon.getComponent(cc.Sprite).spriteFrame = this.flag2;
}
},
showOpenServiceReward: function() {
this._bOpenSerViceReward = !0;
if (1 == gCloundMgr.cOpenServiceReward) {
var e = new Date().getTime();
if (util.dateDifference(gameData.gActivityMoneyOpen, Math.floor(e / 1e3)) + 1 >= 5) {
this._bOpenSerViceReward = !1;
console.log("[两元活动]超过5天不显示");
}
} else {
console.log("[两元活动]云控制不显示");
this._bOpenSerViceReward = !1;
}
if (this._bOpenSerViceReward) this.node.active = !0; else {
this.node.active = !1;
gameData.off("moduleTipUpdate", this.node);
}
this.updateUI();
}
});
cc._RF.pop();
}, {} ],
nodeDividend: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "64ca0/5ObdL06dYszp+PUKt", "nodeDividend");
cc.Class({
extends: ui.baseLayer,
properties: {},
start: function() {
this.initDividend();
},
initDividend: function() {
var e = this, t = gMainMgr.getDividendPrpcess(), i = parseFloat((t / 100).toFixed(4));
this.lbl_process_number.getComponent(cc.Label).string = i + "%";
this.img_process_dividend.getComponent(cc.Sprite).fillRange = i / 100;
this.lbl_dividend_value && pageData.msgGetDailyShare(function(t) {
e.lbl_dividend_value.getComponent(cc.Label).string = t.onesy / 100 + "元";
});
this.btn_get_dividend && this.btn_get_dividend.quickBt(function() {
UICtrl.closeAllDlg();
UICtrl.openUI("uiWindows/uiWindowDividendFrom");
});
this.btn_plus_dividend && this.btn_plus_dividend.quickBt(function() {
UICtrl.openUI("uiWindows/uiWindowDividendLogin");
});
this.btn_dividend_from && this.btn_dividend_from.quickBt(function() {
UICtrl.openUI("uiWindows/uiWindowDividendFrom");
});
}
});
cc._RF.pop();
}, {} ],
nodeExitGame: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "4fc46StmIBPlY1ly4p4giy7", "nodeExitGame");
cc.Class({
extends: cc.Component,
properties: {
_openTime: 0
},
onLoad: function() {
cc.systemEvent.on(cc.SystemEvent.EventType.KEY_DOWN, this.onKeyDown, this);
},
onKeyDown: function() {
var e = Date.now();
if (this._openTime > 0 && e - this._openTime < 1e3) cc.sys.isNative && cc.game.end(); else {
this._openTime = e;
gWordMgr.showTip("再按一次退出");
}
}
});
cc._RF.pop();
}, {} ],
nodeFriendGroupTip: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "7434dHEsnBF6rhVSaIzbB36", "nodeFriendGroupTip");
cc.Class({
extends: cc.Component,
properties: {},
start: function() {
var e = this;
gameData.on("moduleTipUpdate", function(t) {
t == G_WINDOW_FROM.FAMILY && e.updateTip();
});
},
updateTip: function() {
gameData.hasFamilyTip ? this.getComponent(cc.Animation).play("shake") : this.getComponent(cc.Animation).stop();
}
});
cc._RF.pop();
}, {} ],
nodeLabelTip: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "49e6afO2l5D07nAvIJZckDX", "nodeLabelTip");
cc.Class({
extends: cc.Component,
properties: {
delay: .5,
defaultTab: 3
},
start: function() {
if (1 == gCloundMgr.cShowTurntable) {
this.moveToMiddle();
this.touchTurn();
} else this.node.active = !1;
},
moveToMiddle: function() {
var e = this.node.y;
this.node.x = 720;
var t = cc.moveTo(.7, cc.v2(0, e)), i = cc.delayTime(this.delay);
this.node.runAction(cc.sequence(i, t));
},
touchTurn: function() {
var e = this;
this.node.quickBt(function() {
UICtrl.closeAllDlg();
gTurntableMgr.openTurntable(e.defaultTab);
}, !0);
}
});
cc._RF.pop();
}, {} ],
nodeLoading: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "baebe5vd/tHepInswVyqLvE", "nodeLoading");
cc.Class({
extends: cc.Component,
properties: {},
start: function() {},
init: function(e) {
this.downloadResources([ "tilemap", "monster", "tower", "effect", "prefab/uiGame", "prefab/uiFriendGroup", "prefab/uiGuideLayer" ], e, 0);
},
downloadResources: function(e, t, i) {
var n = i || 0;
this.lastProcess = 0;
cc.loader.loadResDir(e[n], function(t, i, o) {
if (i > 0) {
var a = Math.floor(100 * (1 / e.length * (t / i) + n * (1 / e.length)));
a < this.lastProcess ? a = this.lastProcess : this.lastProcess = a;
this.getComponent(cc.Sprite).fillRange = (a + 10) / 100;
}
}.bind(this), function(i, o, a) {
if (++n < e.length) this.downloadResources(e, t, n); else {
console.log("资源加载完成");
t();
}
}.bind(this));
}
});
cc._RF.pop();
}, {} ],
nodeMoveToMiddle: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "b8892kw0xlF0r+IyLmLWlAz", "nodeMoveToMiddle");
cc.Class({
extends: cc.Component,
properties: {
delay: 0
},
start: function() {
var e = this.node.y;
this.node.x = 720;
var t = cc.moveTo(.7, cc.v2(0, e)), i = cc.delayTime(this.delay);
this.node.runAction(cc.sequence(i, t));
}
});
cc._RF.pop();
}, {} ],
nodeNotice: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "8735dwjUVBFNLJNxPhOQWEg", "nodeNotice");
cc.Class({
extends: ui.baseLayer,
properties: {
_noticeList: []
},
showWebNotice: function(e) {
var t = this;
e.forEach(function(e) {
var i = e.WeiXinName, n = 1e3 * e.time, o = new Date(n).Format("yyyy-M-d h:m:s");
console.log("[广播]", i, 111, o);
var a = "玩家<color=#EBB62E>" + i + "</color>于<color=#2BC4FF>" + o + "</color>合成一只<color=#EBB62E>111</color>";
t._noticeList.push(a);
t._noticeList.push(a);
t._noticeList.push(a);
});
this.runNotice();
},
start: function() {
this.notice_label.x = 360;
},
runNotice: function() {
var e = this;
if (this._noticeList.length <= 0) this.notice_banner.active = !1; else {
this.notice_banner.active = !0;
if (360 == this.notice_label.x) {
this.notice_label.x = 360;
var t = this._noticeList.shift();
this.notice_label.getComponent(cc.RichText).string = t;
var i = -360 - this.notice_label.width, n = (360 - i) / 150, o = cc.moveTo(n, cc.v2(i, 0)), a = cc.callFunc(function() {
e.notice_label.x = 360;
e.runNotice();
}), s = cc.sequence(o, a);
this.notice_label.runAction(s);
}
}
}
});
cc._RF.pop();
}, {} ],
nodeQuickSign: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "c436ahG8xtFDI2oyrNMG0FX", "nodeQuickSign");
cc.Enum({
TO_SIGN: 1,
TO_UP: 2
});
cc.Class({
extends: ui.baseLayer,
properties: {}
});
cc._RF.pop();
}, {} ],
nodeRotationRepeat: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "74c57ydtuVOIb1ckP8iwOBF", "nodeRotationRepeat");
cc.Class({
extends: cc.Component,
properties: {},
start: function() {
var e = cc.rotateTo(100, 3600);
this.node.runAction(cc.repeatForever(e));
}
});
cc._RF.pop();
}, {} ],
nodeTimeMoney: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "e9556umI81GlpPnub5GFHoK", "nodeTimeMoney");
cc.Class({
extends: ui.baseLayer,
properties: {},
start: function() {
this._lastConfig = void 0;
this.initEvent();
G_NODE.TIME_MONEY = this;
},
initTime: function() {
this.unscheduleAllCallbacks();
this.toTimeout();
},
toTimeout: function() {
this.setDefaultTime();
var e = gFunctionMgr.getOneStringToSplit(gameData.gDayTimeMoney);
if (e) {
var t = parseInt(e[1]), i = parseInt(e[0]);
if (t > gCloundMgr.cTimeMoneyMax) {
console.log("[限时红包]达到上限", t, gCloundMgr.cTimeMoneyMax);
this.ritchMax();
} else {
var n = cdMoneyCsvData.getInfoByID(t);
this._lastConfig = n;
var o = 60 * n.info, a = Math.floor(new Date().getTime() / 1e3) - i;
a < 0 && (a = 0);
a > o && (a = o);
var s = o - a;
this.beginTimeout(s);
console.log("[限时红包开始]", t, i, o);
}
}
},
beginTimeout: function(e) {
var t = this, i = e;
if (i <= 0) this.setGetStateActive(!0); else {
this.setGetStateActive(!1);
this.lbl_timeMoney_timeout.getComponent(cc.Label).string = util.ChangeTimeToSeconds(i, 2);
this.schedule(function() {
i--;
t.lbl_timeMoney_timeout.getComponent(cc.Label).string = util.ChangeTimeToSeconds(i, 2);
0 == i && t.setGetStateActive(!0);
}, 1, e - 1);
}
},
setGetStateActive: function(e) {
if (e) {
this.lbl_timeMoney_get.active = !0;
this.img_timeMoney_light.active = !0;
this.lbl_timeMoney_timeout.active = !1;
this.img_timeMoney_normal.active = !1;
} else {
this.lbl_timeMoney_get.active = !1;
this.img_timeMoney_light.active = !1;
this.lbl_timeMoney_timeout.active = !0;
this.img_timeMoney_normal.active = !0;
}
},
initEvent: function() {
var e = this;
this.node.quickBt(function() {
e.clickNode();
});
},
clickNode: function() {
var e = this;
if (this.lbl_timeMoney_get.active) {
var t = this._lastConfig.reward, i = util.randomRange(gCloundMgr.cTimeMoneyExt[0], gCloundMgr.cTimeMoneyExt[1]);
UICtrl.openUI("uiCommon/uiCommonMoney", function(n) {
n.initVideoExt(G_MONEY_FROM.TIME, G_VIDEO_FROM.TIME, t, i, function() {
gFunctionMgr.addPlayerExp(G_EXP_FROM.TIME_MONEY, e._lastConfig.id);
e.beginNextTimeout();
});
});
return !0;
}
gWordMgr.showTip("正在CD中");
return !1;
},
beginNextTimeout: function() {
if (gameData.gDayTimeMoney) {
var e = parseInt(this._lastConfig.id) + 1;
if (e < 5) e = 11;
if (e > gCloundMgr.cTimeMoneyMax) {
console.log("[限时红包]达到上限", e, gCloundMgr.cTimeMoneyMax);
this.ritchMax();
} else {
var t = Math.floor(new Date().getTime() / 1e3), i = gFunctionMgr.saveTwoStringToOne(t, e);
gameData.set("gDayTimeMoney", i);
this.toTimeout();
}
} else {
this.setDefaultTime();
this.toTimeout();
}
},
setDefaultTime: function() {
if (!gameData.gDayTimeMoney) {
var e = Math.floor(new Date().getTime() / 1e3), t = gFunctionMgr.saveTwoStringToOne(e, 11);
gameData.set("gDayTimeMoney", t);
}
},
ritchMax: function() {
this.lbl_timeMoney_timeout.active = !1;
this.img_timeMoney_light.active = !1;
this.lbl_timeMoney_get.active = !1;
this.lbl_timeMoney_end.active = !0;
this.img_timeMoney_normal.active = !0;
}
});
cc._RF.pop();
}, {} ],
onLineMoneyCsvData: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "ee4b5EvdXNIx4TUZFRhVsiG", "onLineMoneyCsvData");
var n = e("csvData"), o = cc.Class({
extends: n,
properties: {
_fileName: {
override: !0,
default: "online_honbao"
}
}
});
window.onLineMoneyCsvData = new o();
cc._RF.pop();
}, {
csvData: "csvData"
} ],
pageData: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "55afbkPTV9NDoeGtZBFtBTI", "pageData");
var n = e("baseData"), o = "http://bzxgs-hb-dl.yx0599.com/bzxgs_hb/config/gameConfig.json", a = "http://bzxgs-hb-dl.yx0599.com/bzxgs_hb/config/initConfig.json";
if (cc.sys.os == cc.sys.OS_IOS) {
o = "http://bzxgs-hb-dl.yx0599.com/bzxgs_hb/IOSConfig2/gameConfig.json";
a = "http://bzxgs-hb-dl.yx0599.com/bzxgs_hb/IOSConfig2/initConfig.json";
}
var s = cc.Class({
extends: n,
name: "pageData",
properties: {
_url_web: "http://bzxgs-ii-web.yx0599.com/",
_url_config: o
},
init: function() {
if (!window.ISFORMAL) {
this._url_web = "http://dbgsweb.inner-ht.0599yx.com/";
this._url_config = "http://bzxgs-hb-dl.yx0599.com/bzxgs_hb/inner/gameConfig.json";
}
},
toHTTPGet: function(e, t, i, n) {
HTTP.GET(e, t, function(e) {
e && e.success ? i && i(e) : n && n(e);
}, function() {
n && n();
});
},
toHTTPNormal: function(e, t, i, n) {
HTTP.GET(e, t, function(e) {
i && i(e);
}, function(e) {
n && n(e);
});
},
msgOpenUpdate: function(e) {
var t = this, i = a + "?t=" + new Date().getTime();
this.toHTTPNormal(i, {}, function(i) {
t._initConfig = i;
var n = i.openUpdate;
console.log("[登陆]是否打开热更新", n);
if (i.closeLog && cc.sys.isNative && window.ISFORMAL) {
console.log = function() {};
console.error = function() {};
console.warn = function() {};
}
e(n);
}, function() {
setTimeout(function() {
t.msgOpenUpdate(e);
}, 1e3);
});
},
msgOpenStop: function() {
var e = this;
console.log("[登录]是否停服", this._initConfig.stop);
if (this._initConfig.stop) {
UICtrl.openUI("uiFrame/uiWindowStop", function(t) {
t.initData(e._initConfig.stopTime);
});
return !1;
}
var t = parseFloat(this._initConfig.downVersion);
console.log("[登录]强更版本", t);
0;
if (t > 0) {
var i = nativeData.getLocalVersion();
console.log("[登录]本地版本", i);
if (!i || i < t) {
UICtrl.openUI("uiFrame/uiUpdateWindow");
return !1;
}
}
return !0;
},
msgGetGameConfig: function() {
var e = this, t = this._url_config + "?t=" + new Date().getTime();
this.toHTTPNormal(t, {}, function(e) {
gCloundMgr.setCloundData(e);
}, function() {
setTimeout(function() {
e.msgGetGameConfig();
}, 1e3);
});
},
msgGetCustomerConfig: function() {
var e = this, t = nativeData.getChannelCode();
console.log("[获取客服配置]", t);
if (5 == t) {
var i = "http://bzxgs-hb-dl.yx0599.com/bzxgs_hb/config/customerLink.json?t=" + new Date().getTime();
this.toHTTPNormal(i, {}, function(e) {
console.log("[获取客服配置]返回");
gCloundMgr.setCustomerData(e);
}, function() {
setTimeout(function() {
e.msgGetCustomerConfig();
}, 1e3);
});
}
},
msgGetRedPackConfig: function(e) {
var t = this;
this._moneyConfig ? e && e(this._moneyConfig) : this.toHTTPNormal(this._url_web + "RedMoney/RedMoneyConf", {
userid: gameData.userID,
token: gameData.tokenJM
}, function(i) {
console.log("[红包配置]", i);
if (i && i.jsonresult) {
var n = {};
if (i.total) for (var o in i.total) n[i.total[o]] = !0;
t._moneyConfig = {};
t._moneyConfig.result = i.jsonresult;
t._moneyConfig.getHistory = n;
e && e(t._moneyConfig);
}
}, function() {
console.log("获取红包配置失败");
});
},
msgGetDailyShare: function(e) {
var t = this;
this._divdendInfo ? e(this._divdendInfo) : this.toHTTPNormal(this._url_web + "default/DivDendInfo", {
userid: gameData.userID,
token: gameData.tokenJM
}, function(i) {
t._divdendInfo = i.jsonresult;
e && e(t._divdendInfo);
}, function() {});
},
msgTryWithdraw: function(e, t, i) {
this.toHTTPNormal(this._url_web + "WeiXin/SendRedPack", {
userid: gameData.userID,
goodid: e,
token: gameData.tokenJM
}, function(e) {
console.log("[红包提现]", e);
t && t(e);
}, function() {
i && i();
console.log("红包提现失败");
});
},
msgGetBoxMoneyConfig: function(e, t) {
this.toHTTPNormal(this._url_web + "RedMoney/GetTboxRedMoneyConf", {
userid: gameData.userID,
token: gameData.tokenJM
}, function(t) {
var i = t.jsonresult[0];
gameData.gBoxMoney = parseInt(i.amount) / 100;
gameData.gBoxMoneyID = i.id;
e && e(i);
}, function() {
t && t();
});
},
msgGetBoxMoney: function(e, t) {
this.toHTTPNormal(this._url_web + "WeiXin/SendRedPackForBox", {
userid: gameData.userID,
token: gameData.tokenJM,
goodid: gameData.gBoxMoneyID
}, function(t) {
if (t.success) {
gWordMgr.showTip(t.msg, 1);
gameData.gBoxUser = 3;
e && e();
G_NODE.HALL.img_gameBox.getComponent("nodeBtnGameBox").showWithDrawal();
}
}, function() {
t && t();
});
},
msgInitPhoneConfig: function(e) {
var t = this;
if (this._phoneJson) e && e(); else {
var i = "http://bzxgs-hb-dl.yx0599.com/bzxgs_hb/config/daily_times.json?t=" + new Date().getTime();
this.toHTTPNormal(i, {}, function(i) {
t._phoneJson = i;
e && e();
}, function() {
setTimeout(function() {
t.msgGetPhoneConfig();
}, 1e3);
});
}
},
msgGetPhoneConfig: function() {
return this._phoneJson;
},
msgInitLotteryConfig: function(e) {
var t = this;
if (this._hasGetLotteryMoney) e && e(this._hasGetLotteryMoney); else {
this.toHTTPNormal(this._url_web + "RedMoney/GetRewardMoneyConf", {
userid: gameData.userID,
token: gameData.tokenJM
}, function(i) {
var n = parseInt(i.total || -1);
t._hasGetLotteryMoney = n;
e && e(t._hasGetLotteryMoney);
}, function() {});
}
},
setHasGetLotteryMoney: function() {
this._hasGetLotteryMoney = 1;
},
getHasGetLotteryMoney: function() {
return 1 == this._hasGetLotteryMoney;
},
msgGetLotteryMoney: function(e, t) {
this.toHTTPNormal(this._url_web + "WeiXin/SendRedPackForReward", {
userid: gameData.userID,
token: gameData.tokenJM,
goodid: 2
}, function(t) {
if (t.success) {
gWordMgr.showTip(t.msg, 1);
e && e();
}
}, function() {
t && t();
gWordMgr.showTip("数据错误");
});
},
msgGetSmallChangeLog: function(e, t, i) {
this.toHTTPNormal(this._url_web + "RedMoney/RedMoneyLog", {
userid: gameData.userID,
token: gameData.tokenJM,
PageNo: e,
type: 0
}, function(e) {
console.log("[零钱记录]", e);
e && e.jsonresult && t && t(e.jsonresult);
}, function() {
i && i();
});
},
msgGetOtherGameConfig: function(e, t) {
var i = this;
this._otherGameInfo ? e(this._otherGameInfo) : this.toHTTPNormal("http://bzxgs-hb-dl.yx0599.com/bzxgs_hb/config/otherGame.json", {}, function(t) {
if (t.otherGameInfo) {
i._otherGameInfo = t.otherGameInfo;
e(t.otherGameInfo);
}
}, function() {
t && t();
});
},
msgGetTurnTableConfig: function() {
var e = this, t = "http://bzxgs-hb-dl.yx0599.com/bzxgs_hb/config/task_lottery.json?t=" + new Date().getTime();
this.toHTTPNormal(t, {}, function(t) {
e._lotteryTaskConfig = t;
}, function() {
setTimeout(function() {
e.msgGetTurnTableConfig();
}, 1e3);
});
},
getTurntable: function() {
return this._lotteryTaskConfig || {};
},
getAPKURL: function() {
return "http://bzxgs-hb-dl.yx0599.com/bzxgs_hb/apk/dbxgs-" + nativeData.getChannelCode() + ".apk";
},
getPublicURL: function() {
return "https://lw-public.lw0591.com/";
},
getBoxURL: function() {
return gCloundMgr.cGameBoxUrl;
},
msgUnionWithdraw: function(e, t, i) {
this.toHTTPNormal(this._url_web + "WeiXin/SendRedEarnPack", {
userid: gameData.userID,
amount: e,
token: gameData.tokenJM
}, function(e) {
console.log("[联盟红包提现]", e);
t && t(e);
}, function() {
i && i();
console.log("联盟红包提现失败");
});
},
msgGetUnionRedRecord: function(e, t, i) {
this.toHTTPNormal(this._url_web + "RedMoney/UnionRedMoneyLog", {
userid: gameData.userID,
token: gameData.tokenJM,
PageNo: e,
PageSize: 7
}, function(e) {
console.log("[余额明细记录]", e);
e && e.jsonresult && t && t(e.jsonresult);
}, function() {
i && i();
});
},
msgTurntableWithdraw: function(e, t, i) {
this.toHTTPNormal(this._url_web + "WeiXin/SendRedActivityPack", {
userid: gameData.userID,
amount: e,
token: gameData.tokenJM
}, function(e) {
console.log("[联盟红包提现]", e);
t && t(e);
}, function() {
i && i();
console.log("联盟红包提现失败");
});
}
});
window.pageData = new s();
cc._RF.pop();
}, {
baseData: "baseData"
} ],
protobuf: [ function(require, module, exports) {
"use strict";
cc._RF.push(module, "5d558dnttNEabWXNVud/N2+", "protobuf");
var _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
return typeof e;
} : function(e) {
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
};
(function(global, undefined) {
(function(e, t, i) {
var n = global.protobuf = function i(n) {
var o = t[n];
o || e[n][0].call(o = t[n] = {
exports: {}
}, i, o, o.exports);
return o.exports;
}(i[0]);
"function" == typeof define && define.amd && define([ "long" ], function(e) {
if (e && e.isLong) {
n.util.Long = e;
n.configure();
}
return n;
});
"object" === ("undefined" == typeof module ? "undefined" : _typeof(module)) && module && module.exports && (module.exports = n);
})({
1: [ function(e, t, i) {
t.exports = function(e, t) {
var i = new Array(arguments.length - 1), n = 0, o = 2, a = !0;
for (;o < arguments.length; ) i[n++] = arguments[o++];
return new Promise(function(o, s) {
i[n] = function(e) {
if (a) {
a = !1;
if (e) s(e); else {
for (var t = new Array(arguments.length - 1), i = 0; i < t.length; ) t[i++] = arguments[i];
o.apply(null, t);
}
}
};
try {
e.apply(t || null, i);
} catch (e) {
if (a) {
a = !1;
s(e);
}
}
});
};
}, {} ],
2: [ function(e, t, i) {
var n = i;
n.length = function(e) {
var t = e.length;
if (!t) return 0;
for (var i = 0; --t % 4 > 1 && "=" === e.charAt(t); ) ++i;
return Math.ceil(3 * e.length) / 4 - i;
};
for (var o = new Array(64), a = new Array(123), s = 0; s < 64; ) a[o[s] = s < 26 ? s + 65 : s < 52 ? s + 71 : s < 62 ? s - 4 : s - 59 | 43] = s++;
n.encode = function(e, t, i) {
for (var n, a = null, s = [], r = 0, c = 0; t < i; ) {
var l = e[t++];
switch (c) {
case 0:
s[r++] = o[l >> 2];
n = (3 & l) << 4;
c = 1;
break;

case 1:
s[r++] = o[n | l >> 4];
n = (15 & l) << 2;
c = 2;
break;

case 2:
s[r++] = o[n | l >> 6];
s[r++] = o[63 & l];
c = 0;
}
if (r > 8191) {
(a || (a = [])).push(String.fromCharCode.apply(String, s));
r = 0;
}
}
if (c) {
s[r++] = o[n];
s[r++] = 61;
1 === c && (s[r++] = 61);
}
if (a) {
r && a.push(String.fromCharCode.apply(String, s.slice(0, r)));
return a.join("");
}
return String.fromCharCode.apply(String, s.slice(0, r));
};
n.decode = function(e, t, i) {
for (var n, o = i, s = 0, r = 0; r < e.length; ) {
var c = e.charCodeAt(r++);
if (61 === c && s > 1) break;
if ((c = a[c]) === undefined) throw Error("invalid encoding");
switch (s) {
case 0:
n = c;
s = 1;
break;

case 1:
t[i++] = n << 2 | (48 & c) >> 4;
n = c;
s = 2;
break;

case 2:
t[i++] = (15 & n) << 4 | (60 & c) >> 2;
n = c;
s = 3;
break;

case 3:
t[i++] = (3 & n) << 6 | c;
s = 0;
}
}
if (1 === s) throw Error("invalid encoding");
return i - o;
};
n.test = function(e) {
return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e);
};
}, {} ],
3: [ function(e, t, i) {
t.exports = n;
function n(e, t) {
if ("string" == typeof e) {
t = e;
e = undefined;
}
var i = [];
function o(e) {
if ("string" != typeof e) {
var t = a();
n.verbose && console.log("codegen: " + t);
t = "return " + t;
if (e) {
for (var s = Object.keys(e), r = new Array(s.length + 1), c = new Array(s.length), l = 0; l < s.length; ) {
r[l] = s[l];
c[l] = e[s[l++]];
}
r[l] = t;
return Function.apply(null, r).apply(null, c);
}
return Function(t)();
}
for (var u = new Array(arguments.length - 1), h = 0; h < u.length; ) u[h] = arguments[++h];
h = 0;
e = e.replace(/%([%dfijs])/g, function(e, t) {
var i = u[h++];
switch (t) {
case "d":
case "f":
return String(Number(i));

case "i":
return String(Math.floor(i));

case "j":
return JSON.stringify(i);

case "s":
return String(i);
}
return "%";
});
if (h !== u.length) throw Error("parameter count mismatch");
i.push(e);
return o;
}
function a(n) {
return "function " + (n || t || "") + "(" + (e && e.join(",") || "") + "){\n  " + i.join("\n  ") + "\n}";
}
o.toString = a;
return o;
}
n.verbose = !1;
}, {} ],
4: [ function(e, t, i) {
t.exports = n;
function n() {
this._listeners = {};
}
n.prototype.on = function(e, t, i) {
(this._listeners[e] || (this._listeners[e] = [])).push({
fn: t,
ctx: i || this
});
return this;
};
n.prototype.off = function(e, t) {
if (e === undefined) this._listeners = {}; else if (t === undefined) this._listeners[e] = []; else for (var i = this._listeners[e], n = 0; n < i.length; ) i[n].fn === t ? i.splice(n, 1) : ++n;
return this;
};
n.prototype.emit = function(e) {
var t = this._listeners[e];
if (t) {
for (var i = [], n = 1; n < arguments.length; ) i.push(arguments[n++]);
for (n = 0; n < t.length; ) t[n].fn.apply(t[n++].ctx, i);
}
return this;
};
}, {} ],
5: [ function(e, t, i) {
t.exports = a;
var n = e(1), o = e(7)("fs");
function a(e, t, i) {
if ("function" == typeof t) {
i = t;
t = {};
} else t || (t = {});
return i ? !t.xhr && o && o.readFile ? o.readFile(e, function(n, o) {
return n && "undefined" != typeof XMLHttpRequest ? a.xhr(e, t, i) : n ? i(n) : i(null, t.binary ? o : o.toString("utf8"));
}) : a.xhr(e, t, i) : n(a, this, e, t);
}
a.xhr = function(e, t, i) {
var n = new XMLHttpRequest();
n.onreadystatechange = function() {
if (4 !== n.readyState) return undefined;
if (0 !== n.status && 200 !== n.status) return i(Error("status " + n.status));
if (t.binary) {
var e = n.response;
if (!e) {
e = [];
for (var o = 0; o < n.responseText.length; ++o) e.push(255 & n.responseText.charCodeAt(o));
}
return i(null, "undefined" != typeof Uint8Array ? new Uint8Array(e) : e);
}
return i(null, n.responseText);
};
if (t.binary) {
"overrideMimeType" in n && n.overrideMimeType("text/plain; charset=x-user-defined");
n.responseType = "arraybuffer";
}
n.open("GET", e);
n.send();
};
}, {
1: 1,
7: 7
} ],
6: [ function(e, t, i) {
t.exports = n(n);
function n(e) {
"undefined" != typeof Float32Array ? function() {
var t = new Float32Array([ -0 ]), i = new Uint8Array(t.buffer), n = 128 === i[3];
function o(e, n, o) {
t[0] = e;
n[o] = i[0];
n[o + 1] = i[1];
n[o + 2] = i[2];
n[o + 3] = i[3];
}
function a(e, n, o) {
t[0] = e;
n[o] = i[3];
n[o + 1] = i[2];
n[o + 2] = i[1];
n[o + 3] = i[0];
}
e.writeFloatLE = n ? o : a;
e.writeFloatBE = n ? a : o;
function s(e, n) {
i[0] = e[n];
i[1] = e[n + 1];
i[2] = e[n + 2];
i[3] = e[n + 3];
return t[0];
}
function r(e, n) {
i[3] = e[n];
i[2] = e[n + 1];
i[1] = e[n + 2];
i[0] = e[n + 3];
return t[0];
}
e.readFloatLE = n ? s : r;
e.readFloatBE = n ? r : s;
}() : function() {
function t(e, t, i, n) {
var o = t < 0 ? 1 : 0;
o && (t = -t);
if (0 === t) e(1 / t > 0 ? 0 : 2147483648, i, n); else if (isNaN(t)) e(2143289344, i, n); else if (t > 3.4028234663852886e38) e((o << 31 | 2139095040) >>> 0, i, n); else if (t < 1.1754943508222875e-38) e((o << 31 | Math.round(t / 1.401298464324817e-45)) >>> 0, i, n); else {
var a = Math.floor(Math.log(t) / Math.LN2);
e((o << 31 | a + 127 << 23 | 8388607 & Math.round(t * Math.pow(2, -a) * 8388608)) >>> 0, i, n);
}
}
e.writeFloatLE = t.bind(null, o);
e.writeFloatBE = t.bind(null, a);
function i(e, t, i) {
var n = e(t, i), o = 2 * (n >> 31) + 1, a = n >>> 23 & 255, s = 8388607 & n;
return 255 === a ? s ? NaN : Infinity * o : 0 === a ? 1.401298464324817e-45 * o * s : o * Math.pow(2, a - 150) * (s + 8388608);
}
e.readFloatLE = i.bind(null, s);
e.readFloatBE = i.bind(null, r);
}();
"undefined" != typeof Float64Array ? function() {
var t = new Float64Array([ -0 ]), i = new Uint8Array(t.buffer), n = 128 === i[7];
function o(e, n, o) {
t[0] = e;
n[o] = i[0];
n[o + 1] = i[1];
n[o + 2] = i[2];
n[o + 3] = i[3];
n[o + 4] = i[4];
n[o + 5] = i[5];
n[o + 6] = i[6];
n[o + 7] = i[7];
}
function a(e, n, o) {
t[0] = e;
n[o] = i[7];
n[o + 1] = i[6];
n[o + 2] = i[5];
n[o + 3] = i[4];
n[o + 4] = i[3];
n[o + 5] = i[2];
n[o + 6] = i[1];
n[o + 7] = i[0];
}
e.writeDoubleLE = n ? o : a;
e.writeDoubleBE = n ? a : o;
function s(e, n) {
i[0] = e[n];
i[1] = e[n + 1];
i[2] = e[n + 2];
i[3] = e[n + 3];
i[4] = e[n + 4];
i[5] = e[n + 5];
i[6] = e[n + 6];
i[7] = e[n + 7];
return t[0];
}
function r(e, n) {
i[7] = e[n];
i[6] = e[n + 1];
i[5] = e[n + 2];
i[4] = e[n + 3];
i[3] = e[n + 4];
i[2] = e[n + 5];
i[1] = e[n + 6];
i[0] = e[n + 7];
return t[0];
}
e.readDoubleLE = n ? s : r;
e.readDoubleBE = n ? r : s;
}() : function() {
function t(e, t, i, n, o, a) {
var s = n < 0 ? 1 : 0;
s && (n = -n);
if (0 === n) {
e(0, o, a + t);
e(1 / n > 0 ? 0 : 2147483648, o, a + i);
} else if (isNaN(n)) {
e(0, o, a + t);
e(2146959360, o, a + i);
} else if (n > 1.7976931348623157e308) {
e(0, o, a + t);
e((s << 31 | 2146435072) >>> 0, o, a + i);
} else {
var r;
if (n < 2.2250738585072014e-308) {
e((r = n / 5e-324) >>> 0, o, a + t);
e((s << 31 | r / 4294967296) >>> 0, o, a + i);
} else {
var c = Math.floor(Math.log(n) / Math.LN2);
1024 === c && (c = 1023);
e(4503599627370496 * (r = n * Math.pow(2, -c)) >>> 0, o, a + t);
e((s << 31 | c + 1023 << 20 | 1048576 * r & 1048575) >>> 0, o, a + i);
}
}
}
e.writeDoubleLE = t.bind(null, o, 0, 4);
e.writeDoubleBE = t.bind(null, a, 4, 0);
function i(e, t, i, n, o) {
var a = e(n, o + t), s = e(n, o + i), r = 2 * (s >> 31) + 1, c = s >>> 20 & 2047, l = 4294967296 * (1048575 & s) + a;
return 2047 === c ? l ? NaN : Infinity * r : 0 === c ? 5e-324 * r * l : r * Math.pow(2, c - 1075) * (l + 4503599627370496);
}
e.readDoubleLE = i.bind(null, s, 0, 4);
e.readDoubleBE = i.bind(null, r, 4, 0);
}();
return e;
}
function o(e, t, i) {
t[i] = 255 & e;
t[i + 1] = e >>> 8 & 255;
t[i + 2] = e >>> 16 & 255;
t[i + 3] = e >>> 24;
}
function a(e, t, i) {
t[i] = e >>> 24;
t[i + 1] = e >>> 16 & 255;
t[i + 2] = e >>> 8 & 255;
t[i + 3] = 255 & e;
}
function s(e, t) {
return (e[t] | e[t + 1] << 8 | e[t + 2] << 16 | e[t + 3] << 24) >>> 0;
}
function r(e, t) {
return (e[t] << 24 | e[t + 1] << 16 | e[t + 2] << 8 | e[t + 3]) >>> 0;
}
}, {} ],
7: [ function(require, module, exports) {
module.exports = inquire;
function inquire(moduleName) {
try {
var mod = eval("quire".replace(/^/, "re"))(moduleName);
if (mod && (mod.length || Object.keys(mod).length)) return mod;
} catch (e) {}
return null;
}
}, {} ],
8: [ function(e, t, i) {
var n = i, o = n.isAbsolute = function(e) {
return /^(?:\/|\w+:)/.test(e);
}, a = n.normalize = function(e) {
var t = (e = e.replace(/\\/g, "/").replace(/\/{2,}/g, "/")).split("/"), i = o(e), n = "";
i && (n = t.shift() + "/");
for (var a = 0; a < t.length; ) ".." === t[a] ? a > 0 && ".." !== t[a - 1] ? t.splice(--a, 2) : i ? t.splice(a, 1) : ++a : "." === t[a] ? t.splice(a, 1) : ++a;
return n + t.join("/");
};
n.resolve = function(e, t, i) {
i || (t = a(t));
if (o(t)) return t;
i || (e = a(e));
return (e = e.replace(/(?:\/|^)[^/]+$/, "")).length ? a(e + "/" + t) : t;
};
}, {} ],
9: [ function(e, t, i) {
t.exports = function(e, t, i) {
var n = i || 8192, o = n >>> 1, a = null, s = n;
return function(i) {
if (i < 1 || i > o) return e(i);
if (s + i > n) {
a = e(n);
s = 0;
}
var r = t.call(a, s, s += i);
7 & s && (s = 1 + (7 | s));
return r;
};
};
}, {} ],
10: [ function(e, t, i) {
var n = i;
n.length = function(e) {
for (var t = 0, i = 0, n = 0; n < e.length; ++n) if ((i = e.charCodeAt(n)) < 128) t += 1; else if (i < 2048) t += 2; else if (55296 == (64512 & i) && 56320 == (64512 & e.charCodeAt(n + 1))) {
++n;
t += 4;
} else t += 3;
return t;
};
n.read = function(e, t, i) {
if (i - t < 1) return "";
for (var n, o = null, a = [], s = 0; t < i; ) {
if ((n = e[t++]) < 128) a[s++] = n; else if (n > 191 && n < 224) a[s++] = (31 & n) << 6 | 63 & e[t++]; else if (n > 239 && n < 365) {
n = ((7 & n) << 18 | (63 & e[t++]) << 12 | (63 & e[t++]) << 6 | 63 & e[t++]) - 65536;
a[s++] = 55296 + (n >> 10);
a[s++] = 56320 + (1023 & n);
} else a[s++] = (15 & n) << 12 | (63 & e[t++]) << 6 | 63 & e[t++];
if (s > 8191) {
(o || (o = [])).push(String.fromCharCode.apply(String, a));
s = 0;
}
}
if (o) {
s && o.push(String.fromCharCode.apply(String, a.slice(0, s)));
return o.join("");
}
return String.fromCharCode.apply(String, a.slice(0, s));
};
n.write = function(e, t, i) {
for (var n, o, a = i, s = 0; s < e.length; ++s) if ((n = e.charCodeAt(s)) < 128) t[i++] = n; else if (n < 2048) {
t[i++] = n >> 6 | 192;
t[i++] = 63 & n | 128;
} else if (55296 == (64512 & n) && 56320 == (64512 & (o = e.charCodeAt(s + 1)))) {
n = 65536 + ((1023 & n) << 10) + (1023 & o);
++s;
t[i++] = n >> 18 | 240;
t[i++] = n >> 12 & 63 | 128;
t[i++] = n >> 6 & 63 | 128;
t[i++] = 63 & n | 128;
} else {
t[i++] = n >> 12 | 224;
t[i++] = n >> 6 & 63 | 128;
t[i++] = 63 & n | 128;
}
return i - a;
};
}, {} ],
11: [ function(e, t, i) {
t.exports = a;
var n, o = /\/|\./;
function a(e, t) {
if (!o.test(e)) {
e = "google/protobuf/" + e + ".proto";
t = {
nested: {
google: {
nested: {
protobuf: {
nested: t
}
}
}
}
};
}
a[e] = t;
}
a("any", {
Any: {
fields: {
type_url: {
type: "string",
id: 1
},
value: {
type: "bytes",
id: 2
}
}
}
});
a("duration", {
Duration: n = {
fields: {
seconds: {
type: "int64",
id: 1
},
nanos: {
type: "int32",
id: 2
}
}
}
});
a("timestamp", {
Timestamp: n
});
a("empty", {
Empty: {
fields: {}
}
});
a("struct", {
Struct: {
fields: {
fields: {
keyType: "string",
type: "Value",
id: 1
}
}
},
Value: {
oneofs: {
kind: {
oneof: [ "nullValue", "numberValue", "stringValue", "boolValue", "structValue", "listValue" ]
}
},
fields: {
nullValue: {
type: "NullValue",
id: 1
},
numberValue: {
type: "double",
id: 2
},
stringValue: {
type: "string",
id: 3
},
boolValue: {
type: "bool",
id: 4
},
structValue: {
type: "Struct",
id: 5
},
listValue: {
type: "ListValue",
id: 6
}
}
},
NullValue: {
values: {
NULL_VALUE: 0
}
},
ListValue: {
fields: {
values: {
rule: "repeated",
type: "Value",
id: 1
}
}
}
});
a("wrappers", {
DoubleValue: {
fields: {
value: {
type: "double",
id: 1
}
}
},
FloatValue: {
fields: {
value: {
type: "float",
id: 1
}
}
},
Int64Value: {
fields: {
value: {
type: "int64",
id: 1
}
}
},
UInt64Value: {
fields: {
value: {
type: "uint64",
id: 1
}
}
},
Int32Value: {
fields: {
value: {
type: "int32",
id: 1
}
}
},
UInt32Value: {
fields: {
value: {
type: "uint32",
id: 1
}
}
},
BoolValue: {
fields: {
value: {
type: "bool",
id: 1
}
}
},
StringValue: {
fields: {
value: {
type: "string",
id: 1
}
}
},
BytesValue: {
fields: {
value: {
type: "bytes",
id: 1
}
}
}
});
a("field_mask", {
FieldMask: {
fields: {
paths: {
rule: "repeated",
type: "string",
id: 1
}
}
}
});
a.get = function(e) {
return a[e] || null;
};
}, {} ],
12: [ function(e, t, i) {
var n = i, o = e(15), a = e(37);
function s(e, t, i, n) {
if (t.resolvedType) if (t.resolvedType instanceof o) {
e("switch(d%s){", n);
for (var a = t.resolvedType.values, s = Object.keys(a), r = 0; r < s.length; ++r) {
t.repeated && a[s[r]] === t.typeDefault && e("default:");
e("case%j:", s[r])("case %i:", a[s[r]])("m%s=%j", n, a[s[r]])("break");
}
e("}");
} else e('if(typeof d%s!=="object")', n)("throw TypeError(%j)", t.fullName + ": object expected")("m%s=types[%i].fromObject(d%s)", n, i, n); else {
var c = !1;
switch (t.type) {
case "double":
case "float":
e("m%s=Number(d%s)", n, n);
break;

case "uint32":
case "fixed32":
e("m%s=d%s>>>0", n, n);
break;

case "int32":
case "sint32":
case "sfixed32":
e("m%s=d%s|0", n, n);
break;

case "uint64":
c = !0;

case "int64":
case "sint64":
case "fixed64":
case "sfixed64":
e("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j", n, n, c)('else if(typeof d%s==="string")', n)("m%s=parseInt(d%s,10)", n, n)('else if(typeof d%s==="number")', n)("m%s=d%s", n, n)('else if(typeof d%s==="object")', n)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)", n, n, n, c ? "true" : "");
break;

case "bytes":
e('if(typeof d%s==="string")', n)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)", n, n, n)("else if(d%s.length)", n)("m%s=d%s", n, n);
break;

case "string":
e("m%s=String(d%s)", n, n);
break;

case "bool":
e("m%s=Boolean(d%s)", n, n);
}
}
return e;
}
n.fromObject = function(e) {
var t = e.fieldsArray, i = a.codegen([ "d" ], e.name + "$fromObject")("if(d instanceof this.ctor)")("return d");
if (!t.length) return i("return new this.ctor");
i("var m=new this.ctor");
for (var n = 0; n < t.length; ++n) {
var r = t[n].resolve(), c = a.safeProp(r.name);
if (r.map) {
i("if(d%s){", c)('if(typeof d%s!=="object")', c)("throw TypeError(%j)", r.fullName + ": object expected")("m%s={}", c)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){", c);
s(i, r, n, c + "[ks[i]]")("}")("}");
} else if (r.repeated) {
i("if(d%s){", c)("if(!Array.isArray(d%s))", c)("throw TypeError(%j)", r.fullName + ": array expected")("m%s=[]", c)("for(var i=0;i<d%s.length;++i){", c);
s(i, r, n, c + "[i]")("}")("}");
} else {
r.resolvedType instanceof o || i("if(d%s!=null){", c);
s(i, r, n, c);
r.resolvedType instanceof o || i("}");
}
}
return i("return m");
};
function r(e, t, i, n) {
if (t.resolvedType) t.resolvedType instanceof o ? e("d%s=o.enums===String?types[%i].values[m%s]:m%s", n, i, n, n) : e("d%s=types[%i].toObject(m%s,o)", n, i, n); else {
var a = !1;
switch (t.type) {
case "double":
case "float":
e("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s", n, n, n, n);
break;

case "uint64":
a = !0;

case "int64":
case "sint64":
case "fixed64":
case "sfixed64":
e('if(typeof m%s==="number")', n)("d%s=o.longs===String?String(m%s):m%s", n, n, n)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s", n, n, n, n, a ? "true" : "", n);
break;

case "bytes":
e("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s", n, n, n, n, n);
break;

default:
e("d%s=m%s", n, n);
}
}
return e;
}
n.toObject = function(e) {
var t = e.fieldsArray.slice().sort(a.compareFieldsById);
if (!t.length) return a.codegen()("return {}");
for (var i = a.codegen([ "m", "o" ], e.name + "$toObject")("if(!o)")("o={}")("var d={}"), n = [], s = [], c = [], l = 0; l < t.length; ++l) t[l].partOf || (t[l].resolve().repeated ? n : t[l].map ? s : c).push(t[l]);
if (n.length) {
i("if(o.arrays||o.defaults){");
for (l = 0; l < n.length; ++l) i("d%s=[]", a.safeProp(n[l].name));
i("}");
}
if (s.length) {
i("if(o.objects||o.defaults){");
for (l = 0; l < s.length; ++l) i("d%s={}", a.safeProp(s[l].name));
i("}");
}
if (c.length) {
i("if(o.defaults){");
for (l = 0; l < c.length; ++l) {
var u = c[l], h = a.safeProp(u.name);
u.resolvedType instanceof o ? i("d%s=o.enums===String?%j:%j", h, u.resolvedType.valuesById[u.typeDefault], u.typeDefault) : u.long ? i("if(util.Long){")("var n=new util.Long(%i,%i,%j)", u.typeDefault.low, u.typeDefault.high, u.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n", h)("}else")("d%s=o.longs===String?%j:%i", h, u.typeDefault.toString(), u.typeDefault.toNumber()) : u.bytes ? i("d%s=o.bytes===String?%j:%s", h, String.fromCharCode.apply(String, u.typeDefault), "[" + Array.prototype.slice.call(u.typeDefault).join(",") + "]") : i("d%s=%j", h, u.typeDefault);
}
i("}");
}
var d = !1;
for (l = 0; l < t.length; ++l) {
u = t[l];
var g = e._fieldsArray.indexOf(u);
h = a.safeProp(u.name);
if (u.map) {
if (!d) {
d = !0;
i("var ks2");
}
i("if(m%s&&(ks2=Object.keys(m%s)).length){", h, h)("d%s={}", h)("for(var j=0;j<ks2.length;++j){");
r(i, u, g, h + "[ks2[j]]")("}");
} else if (u.repeated) {
i("if(m%s&&m%s.length){", h, h)("d%s=[]", h)("for(var j=0;j<m%s.length;++j){", h);
r(i, u, g, h + "[j]")("}");
} else {
i("if(m%s!=null&&m.hasOwnProperty(%j)){", h, u.name);
r(i, u, g, h);
u.partOf && i("if(o.oneofs)")("d%s=%j", a.safeProp(u.partOf.name), u.name);
}
i("}");
}
return i("return d");
};
}, {
15: 15,
37: 37
} ],
13: [ function(e, t, i) {
t.exports = function(e) {
var t = a.codegen([ "r", "l" ], e.name + "$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor" + (e.fieldsArray.filter(function(e) {
return e.map;
}).length ? ",k" : ""))("while(r.pos<c){")("var t=r.uint32()");
e.group && t("if((t&7)===4)")("break");
t("switch(t>>>3){");
for (var i = 0; i < e.fieldsArray.length; ++i) {
var r = e._fieldsArray[i].resolve(), c = r.resolvedType instanceof n ? "int32" : r.type, l = "m" + a.safeProp(r.name);
t("case %i:", r.id);
if (r.map) {
t("r.skip().pos++")("if(%s===util.emptyObject)", l)("%s={}", l)("k=r.%s()", r.keyType)("r.pos++");
o.long[r.keyType] !== undefined ? o.basic[c] === undefined ? t('%s[typeof k==="object"?util.longToHash(k):k]=types[%i].decode(r,r.uint32())', l, i) : t('%s[typeof k==="object"?util.longToHash(k):k]=r.%s()', l, c) : o.basic[c] === undefined ? t("%s[k]=types[%i].decode(r,r.uint32())", l, i) : t("%s[k]=r.%s()", l, c);
} else if (r.repeated) {
t("if(!(%s&&%s.length))", l, l)("%s=[]", l);
o.packed[c] !== undefined && t("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())", l, c)("}else");
o.basic[c] === undefined ? t(r.resolvedType.group ? "%s.push(types[%i].decode(r))" : "%s.push(types[%i].decode(r,r.uint32()))", l, i) : t("%s.push(r.%s())", l, c);
} else o.basic[c] === undefined ? t(r.resolvedType.group ? "%s=types[%i].decode(r)" : "%s=types[%i].decode(r,r.uint32())", l, i) : t("%s=r.%s()", l, c);
t("break");
}
t("default:")("r.skipType(t&7)")("break")("}")("}");
for (i = 0; i < e._fieldsArray.length; ++i) {
var u = e._fieldsArray[i];
u.required && t("if(!m.hasOwnProperty(%j))", u.name)("throw util.ProtocolError(%j,{instance:m})", s(u));
}
return t("return m");
};
var n = e(15), o = e(36), a = e(37);
function s(e) {
return "missing required '" + e.name + "'";
}
}, {
15: 15,
36: 36,
37: 37
} ],
14: [ function(e, t, i) {
t.exports = function(e) {
for (var t, i = a.codegen([ "m", "w" ], e.name + "$encode")("if(!w)")("w=Writer.create()"), r = e.fieldsArray.slice().sort(a.compareFieldsById), c = 0; c < r.length; ++c) {
var l = r[c].resolve(), u = e._fieldsArray.indexOf(l), h = l.resolvedType instanceof n ? "int32" : l.type, d = o.basic[h];
t = "m" + a.safeProp(l.name);
if (l.map) {
i("if(%s!=null&&m.hasOwnProperty(%j)){", t, l.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){", t)("w.uint32(%i).fork().uint32(%i).%s(ks[i])", (l.id << 3 | 2) >>> 0, 8 | o.mapKey[l.keyType], l.keyType);
d === undefined ? i("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()", u, t) : i(".uint32(%i).%s(%s[ks[i]]).ldelim()", 16 | d, h, t);
i("}")("}");
} else if (l.repeated) {
i("if(%s!=null&&%s.length){", t, t);
if (l.packed && o.packed[h] !== undefined) i("w.uint32(%i).fork()", (l.id << 3 | 2) >>> 0)("for(var i=0;i<%s.length;++i)", t)("w.%s(%s[i])", h, t)("w.ldelim()"); else {
i("for(var i=0;i<%s.length;++i)", t);
d === undefined ? s(i, l, u, t + "[i]") : i("w.uint32(%i).%s(%s[i])", (l.id << 3 | d) >>> 0, h, t);
}
i("}");
} else {
l.optional && i("if(%s!=null&&m.hasOwnProperty(%j))", t, l.name);
d === undefined ? s(i, l, u, t) : i("w.uint32(%i).%s(%s)", (l.id << 3 | d) >>> 0, h, t);
}
}
return i("return w");
};
var n = e(15), o = e(36), a = e(37);
function s(e, t, i, n) {
return t.resolvedType.group ? e("types[%i].encode(%s,w.uint32(%i)).uint32(%i)", i, n, (t.id << 3 | 3) >>> 0, (t.id << 3 | 4) >>> 0) : e("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()", i, n, (t.id << 3 | 2) >>> 0);
}
}, {
15: 15,
36: 36,
37: 37
} ],
15: [ function(e, t, i) {
t.exports = s;
var n = e(24);
((s.prototype = Object.create(n.prototype)).constructor = s).className = "Enum";
var o = e(23), a = e(37);
function s(e, t, i, o, a) {
n.call(this, e, i);
if (t && "object" !== ("undefined" == typeof t ? "undefined" : _typeof(t))) throw TypeError("values must be an object");
this.valuesById = {};
this.values = Object.create(this.valuesById);
this.comment = o;
this.comments = a || {};
this.reserved = undefined;
if (t) for (var s = Object.keys(t), r = 0; r < s.length; ++r) "number" == typeof t[s[r]] && (this.valuesById[this.values[s[r]] = t[s[r]]] = s[r]);
}
s.fromJSON = function(e, t) {
var i = new s(e, t.values, t.options, t.comment, t.comments);
i.reserved = t.reserved;
return i;
};
s.prototype.toJSON = function(e) {
var t = !!e && Boolean(e.keepComments);
return a.toObject([ "options", this.options, "values", this.values, "reserved", this.reserved && this.reserved.length ? this.reserved : undefined, "comment", t ? this.comment : undefined, "comments", t ? this.comments : undefined ]);
};
s.prototype.add = function(e, t, i) {
if (!a.isString(e)) throw TypeError("name must be a string");
if (!a.isInteger(t)) throw TypeError("id must be an integer");
if (this.values[e] !== undefined) throw Error("duplicate name '" + e + "' in " + this);
if (this.isReservedId(t)) throw Error("id " + t + " is reserved in " + this);
if (this.isReservedName(e)) throw Error("name '" + e + "' is reserved in " + this);
if (this.valuesById[t] !== undefined) {
if (!this.options || !this.options.allow_alias) throw Error("duplicate id " + t + " in " + this);
this.values[e] = t;
} else this.valuesById[this.values[e] = t] = e;
this.comments[e] = i || null;
return this;
};
s.prototype.remove = function(e) {
if (!a.isString(e)) throw TypeError("name must be a string");
var t = this.values[e];
if (null == t) throw Error("name '" + e + "' does not exist in " + this);
delete this.valuesById[t];
delete this.values[e];
delete this.comments[e];
return this;
};
s.prototype.isReservedId = function(e) {
return o.isReservedId(this.reserved, e);
};
s.prototype.isReservedName = function(e) {
return o.isReservedName(this.reserved, e);
};
}, {
23: 23,
24: 24,
37: 37
} ],
16: [ function(e, t, i) {
t.exports = l;
var n = e(24);
((l.prototype = Object.create(n.prototype)).constructor = l).className = "Field";
var o, a = e(15), s = e(36), r = e(37), c = /^required|optional|repeated$/;
l.fromJSON = function(e, t) {
return new l(e, t.id, t.type, t.rule, t.extend, t.options, t.comment);
};
function l(e, t, i, o, a, l, u) {
if (r.isObject(o)) {
u = a;
l = o;
o = a = undefined;
} else if (r.isObject(a)) {
u = l;
l = a;
a = undefined;
}
n.call(this, e, l);
if (!r.isInteger(t) || t < 0) throw TypeError("id must be a non-negative integer");
if (!r.isString(i)) throw TypeError("type must be a string");
if (o !== undefined && !c.test(o = o.toString().toLowerCase())) throw TypeError("rule must be a string rule");
if (a !== undefined && !r.isString(a)) throw TypeError("extend must be a string");
this.rule = o && "optional" !== o ? o : undefined;
this.type = i;
this.id = t;
this.extend = a || undefined;
this.required = "required" === o;
this.optional = !this.required;
this.repeated = "repeated" === o;
this.map = !1;
this.message = null;
this.partOf = null;
this.typeDefault = null;
this.defaultValue = null;
this.long = !!r.Long && s.long[i] !== undefined;
this.bytes = "bytes" === i;
this.resolvedType = null;
this.extensionField = null;
this.declaringField = null;
this._packed = null;
this.comment = u;
}
Object.defineProperty(l.prototype, "packed", {
get: function() {
null === this._packed && (this._packed = !1 !== this.getOption("packed"));
return this._packed;
}
});
l.prototype.setOption = function(e, t, i) {
"packed" === e && (this._packed = null);
return n.prototype.setOption.call(this, e, t, i);
};
l.prototype.toJSON = function(e) {
var t = !!e && Boolean(e.keepComments);
return r.toObject([ "rule", "optional" !== this.rule && this.rule || undefined, "type", this.type, "id", this.id, "extend", this.extend, "options", this.options, "comment", t ? this.comment : undefined ]);
};
l.prototype.resolve = function() {
if (this.resolved) return this;
if ((this.typeDefault = s.defaults[this.type]) === undefined) {
this.resolvedType = (this.declaringField ? this.declaringField.parent : this.parent).lookupTypeOrEnum(this.type);
this.resolvedType instanceof o ? this.typeDefault = null : this.typeDefault = this.resolvedType.values[Object.keys(this.resolvedType.values)[0]];
}
if (this.options && null != this.options.default) {
this.typeDefault = this.options.default;
this.resolvedType instanceof a && "string" == typeof this.typeDefault && (this.typeDefault = this.resolvedType.values[this.typeDefault]);
}
if (this.options) {
!0 !== this.options.packed && (this.options.packed === undefined || !this.resolvedType || this.resolvedType instanceof a) || delete this.options.packed;
Object.keys(this.options).length || (this.options = undefined);
}
if (this.long) {
this.typeDefault = r.Long.fromNumber(this.typeDefault, "u" === this.type.charAt(0));
Object.freeze && Object.freeze(this.typeDefault);
} else if (this.bytes && "string" == typeof this.typeDefault) {
var e;
r.base64.test(this.typeDefault) ? r.base64.decode(this.typeDefault, e = r.newBuffer(r.base64.length(this.typeDefault)), 0) : r.utf8.write(this.typeDefault, e = r.newBuffer(r.utf8.length(this.typeDefault)), 0);
this.typeDefault = e;
}
this.map ? this.defaultValue = r.emptyObject : this.repeated ? this.defaultValue = r.emptyArray : this.defaultValue = this.typeDefault;
this.parent instanceof o && (this.parent.ctor.prototype[this.name] = this.defaultValue);
return n.prototype.resolve.call(this);
};
l.d = function(e, t, i, n) {
"function" == typeof t ? t = r.decorateType(t).name : t && "object" === ("undefined" == typeof t ? "undefined" : _typeof(t)) && (t = r.decorateEnum(t).name);
return function(o, a) {
r.decorateType(o.constructor).add(new l(a, e, t, i, {
default: n
}));
};
};
l._configure = function(e) {
o = e;
};
}, {
15: 15,
24: 24,
36: 36,
37: 37
} ],
17: [ function(e, t, i) {
var n = t.exports = e(18);
n.build = "light";
n.load = function(e, t, i) {
if ("function" == typeof t) {
i = t;
t = new n.Root();
} else t || (t = new n.Root());
return t.load(e, i);
};
n.loadSync = function(e, t) {
t || (t = new n.Root());
return t.loadSync(e);
};
n.encoder = e(14);
n.decoder = e(13);
n.verifier = e(40);
n.converter = e(12);
n.ReflectionObject = e(24);
n.Namespace = e(23);
n.Root = e(29);
n.Enum = e(15);
n.Type = e(35);
n.Field = e(16);
n.OneOf = e(25);
n.MapField = e(20);
n.Service = e(33);
n.Method = e(22);
n.Message = e(21);
n.wrappers = e(41);
n.types = e(36);
n.util = e(37);
n.ReflectionObject._configure(n.Root);
n.Namespace._configure(n.Type, n.Service);
n.Root._configure(n.Type);
n.Field._configure(n.Type);
}, {
12: 12,
13: 13,
14: 14,
15: 15,
16: 16,
18: 18,
20: 20,
21: 21,
22: 22,
23: 23,
24: 24,
25: 25,
29: 29,
33: 33,
35: 35,
36: 36,
37: 37,
40: 40,
41: 41
} ],
18: [ function(e, t, i) {
var n = i;
n.build = "minimal";
n.Writer = e(42);
n.BufferWriter = e(43);
n.Reader = e(27);
n.BufferReader = e(28);
n.util = e(39);
n.rpc = e(31);
n.roots = e(30);
n.configure = o;
function o() {
n.Reader._configure(n.BufferReader);
n.util._configure();
}
n.Writer._configure(n.BufferWriter);
o();
}, {
27: 27,
28: 28,
30: 30,
31: 31,
39: 39,
42: 42,
43: 43
} ],
19: [ function(e, t, i) {
var n = t.exports = e(17);
n.build = "full";
n.tokenize = e(34);
n.parse = e(26);
n.common = e(11);
n.Root._configure(n.Type, n.parse, n.common);
}, {
11: 11,
17: 17,
26: 26,
34: 34
} ],
20: [ function(e, t, i) {
t.exports = s;
var n = e(16);
((s.prototype = Object.create(n.prototype)).constructor = s).className = "MapField";
var o = e(36), a = e(37);
function s(e, t, i, o, s, r) {
n.call(this, e, t, o, undefined, undefined, s, r);
if (!a.isString(i)) throw TypeError("keyType must be a string");
this.keyType = i;
this.resolvedKeyType = null;
this.map = !0;
}
s.fromJSON = function(e, t) {
return new s(e, t.id, t.keyType, t.type, t.options, t.comment);
};
s.prototype.toJSON = function(e) {
var t = !!e && Boolean(e.keepComments);
return a.toObject([ "keyType", this.keyType, "type", this.type, "id", this.id, "extend", this.extend, "options", this.options, "comment", t ? this.comment : undefined ]);
};
s.prototype.resolve = function() {
if (this.resolved) return this;
if (o.mapKey[this.keyType] === undefined) throw Error("invalid key type: " + this.keyType);
return n.prototype.resolve.call(this);
};
s.d = function(e, t, i) {
"function" == typeof i ? i = a.decorateType(i).name : i && "object" === ("undefined" == typeof i ? "undefined" : _typeof(i)) && (i = a.decorateEnum(i).name);
return function(n, o) {
a.decorateType(n.constructor).add(new s(o, e, t, i));
};
};
}, {
16: 16,
36: 36,
37: 37
} ],
21: [ function(e, t, i) {
t.exports = o;
var n = e(39);
function o(e) {
if (e) for (var t = Object.keys(e), i = 0; i < t.length; ++i) this[t[i]] = e[t[i]];
}
o.create = function(e) {
return this.$type.create(e);
};
o.encode = function(e, t) {
return this.$type.encode(e, t);
};
o.encodeDelimited = function(e, t) {
return this.$type.encodeDelimited(e, t);
};
o.decode = function(e) {
return this.$type.decode(e);
};
o.decodeDelimited = function(e) {
return this.$type.decodeDelimited(e);
};
o.verify = function(e) {
return this.$type.verify(e);
};
o.fromObject = function(e) {
return this.$type.fromObject(e);
};
o.toObject = function(e, t) {
return this.$type.toObject(e, t);
};
o.prototype.toJSON = function() {
return this.$type.toObject(this, n.toJSONOptions);
};
}, {
39: 39
} ],
22: [ function(e, t, i) {
t.exports = a;
var n = e(24);
((a.prototype = Object.create(n.prototype)).constructor = a).className = "Method";
var o = e(37);
function a(e, t, i, a, s, r, c, l) {
if (o.isObject(s)) {
c = s;
s = r = undefined;
} else if (o.isObject(r)) {
c = r;
r = undefined;
}
if (t !== undefined && !o.isString(t)) throw TypeError("type must be a string");
if (!o.isString(i)) throw TypeError("requestType must be a string");
if (!o.isString(a)) throw TypeError("responseType must be a string");
n.call(this, e, c);
this.type = t || "rpc";
this.requestType = i;
this.requestStream = !!s || undefined;
this.responseType = a;
this.responseStream = !!r || undefined;
this.resolvedRequestType = null;
this.resolvedResponseType = null;
this.comment = l;
}
a.fromJSON = function(e, t) {
return new a(e, t.type, t.requestType, t.responseType, t.requestStream, t.responseStream, t.options, t.comment);
};
a.prototype.toJSON = function(e) {
var t = !!e && Boolean(e.keepComments);
return o.toObject([ "type", "rpc" !== this.type && this.type || undefined, "requestType", this.requestType, "requestStream", this.requestStream, "responseType", this.responseType, "responseStream", this.responseStream, "options", this.options, "comment", t ? this.comment : undefined ]);
};
a.prototype.resolve = function() {
if (this.resolved) return this;
this.resolvedRequestType = this.parent.lookupType(this.requestType);
this.resolvedResponseType = this.parent.lookupType(this.responseType);
return n.prototype.resolve.call(this);
};
}, {
24: 24,
37: 37
} ],
23: [ function(e, t, i) {
t.exports = u;
var n = e(24);
((u.prototype = Object.create(n.prototype)).constructor = u).className = "Namespace";
var o, a, s = e(15), r = e(16), c = e(37);
u.fromJSON = function(e, t) {
return new u(e, t.options).addJSON(t.nested);
};
function l(e, t) {
if (!e || !e.length) return undefined;
for (var i = {}, n = 0; n < e.length; ++n) i[e[n].name] = e[n].toJSON(t);
return i;
}
u.arrayToJSON = l;
u.isReservedId = function(e, t) {
if (e) for (var i = 0; i < e.length; ++i) if ("string" != typeof e[i] && e[i][0] <= t && e[i][1] >= t) return !0;
return !1;
};
u.isReservedName = function(e, t) {
if (e) for (var i = 0; i < e.length; ++i) if (e[i] === t) return !0;
return !1;
};
function u(e, t) {
n.call(this, e, t);
this.nested = undefined;
this._nestedArray = null;
}
function h(e) {
e._nestedArray = null;
return e;
}
Object.defineProperty(u.prototype, "nestedArray", {
get: function() {
return this._nestedArray || (this._nestedArray = c.toArray(this.nested));
}
});
u.prototype.toJSON = function(e) {
return c.toObject([ "options", this.options, "nested", l(this.nestedArray, e) ]);
};
u.prototype.addJSON = function(e) {
if (e) for (var t, i = Object.keys(e), n = 0; n < i.length; ++n) {
t = e[i[n]];
this.add((t.fields !== undefined ? o.fromJSON : t.values !== undefined ? s.fromJSON : t.methods !== undefined ? a.fromJSON : t.id !== undefined ? r.fromJSON : u.fromJSON)(i[n], t));
}
return this;
};
u.prototype.get = function(e) {
return this.nested && this.nested[e] || null;
};
u.prototype.getEnum = function(e) {
if (this.nested && this.nested[e] instanceof s) return this.nested[e].values;
throw Error("no such enum: " + e);
};
u.prototype.add = function(e) {
if (!(e instanceof r && e.extend !== undefined || e instanceof o || e instanceof s || e instanceof a || e instanceof u)) throw TypeError("object must be a valid nested object");
if (this.nested) {
var t = this.get(e.name);
if (t) {
if (!(t instanceof u && e instanceof u) || t instanceof o || t instanceof a) throw Error("duplicate name '" + e.name + "' in " + this);
for (var i = t.nestedArray, n = 0; n < i.length; ++n) e.add(i[n]);
this.remove(t);
this.nested || (this.nested = {});
e.setOptions(t.options, !0);
}
} else this.nested = {};
this.nested[e.name] = e;
e.onAdd(this);
return h(this);
};
u.prototype.remove = function(e) {
if (!(e instanceof n)) throw TypeError("object must be a ReflectionObject");
if (e.parent !== this) throw Error(e + " is not a member of " + this);
delete this.nested[e.name];
Object.keys(this.nested).length || (this.nested = undefined);
e.onRemove(this);
return h(this);
};
u.prototype.define = function(e, t) {
if (c.isString(e)) e = e.split("."); else if (!Array.isArray(e)) throw TypeError("illegal path");
if (e && e.length && "" === e[0]) throw Error("path must be relative");
for (var i = this; e.length > 0; ) {
var n = e.shift();
if (i.nested && i.nested[n]) {
if (!((i = i.nested[n]) instanceof u)) throw Error("path conflicts with non-namespace objects");
} else i.add(i = new u(n));
}
t && i.addJSON(t);
return i;
};
u.prototype.resolveAll = function() {
for (var e = this.nestedArray, t = 0; t < e.length; ) e[t] instanceof u ? e[t++].resolveAll() : e[t++].resolve();
return this.resolve();
};
u.prototype.lookup = function(e, t, i) {
if ("boolean" == typeof t) {
i = t;
t = undefined;
} else t && !Array.isArray(t) && (t = [ t ]);
if (c.isString(e) && e.length) {
if ("." === e) return this.root;
e = e.split(".");
} else if (!e.length) return this;
if ("" === e[0]) return this.root.lookup(e.slice(1), t);
var n = this.get(e[0]);
if (n) {
if (1 === e.length) {
if (!t || t.indexOf(n.constructor) > -1) return n;
} else if (n instanceof u && (n = n.lookup(e.slice(1), t, !0))) return n;
} else for (var o = 0; o < this.nestedArray.length; ++o) if (this._nestedArray[o] instanceof u && (n = this._nestedArray[o].lookup(e, t, !0))) return n;
return null === this.parent || i ? null : this.parent.lookup(e, t);
};
u.prototype.lookupType = function(e) {
var t = this.lookup(e, [ o ]);
if (!t) throw Error("no such type: " + e);
return t;
};
u.prototype.lookupEnum = function(e) {
var t = this.lookup(e, [ s ]);
if (!t) throw Error("no such Enum '" + e + "' in " + this);
return t;
};
u.prototype.lookupTypeOrEnum = function(e) {
var t = this.lookup(e, [ o, s ]);
if (!t) throw Error("no such Type or Enum '" + e + "' in " + this);
return t;
};
u.prototype.lookupService = function(e) {
var t = this.lookup(e, [ a ]);
if (!t) throw Error("no such Service '" + e + "' in " + this);
return t;
};
u._configure = function(e, t) {
o = e;
a = t;
};
}, {
15: 15,
16: 16,
24: 24,
37: 37
} ],
24: [ function(e, t, i) {
t.exports = a;
a.className = "ReflectionObject";
var n, o = e(37);
function a(e, t) {
if (!o.isString(e)) throw TypeError("name must be a string");
if (t && !o.isObject(t)) throw TypeError("options must be an object");
this.options = t;
this.name = e;
this.parent = null;
this.resolved = !1;
this.comment = null;
this.filename = null;
}
Object.defineProperties(a.prototype, {
root: {
get: function() {
for (var e = this; null !== e.parent; ) e = e.parent;
return e;
}
},
fullName: {
get: function() {
for (var e = [ this.name ], t = this.parent; t; ) {
e.unshift(t.name);
t = t.parent;
}
return e.join(".");
}
}
});
a.prototype.toJSON = function() {
throw Error();
};
a.prototype.onAdd = function(e) {
this.parent && this.parent !== e && this.parent.remove(this);
this.parent = e;
this.resolved = !1;
var t = e.root;
t instanceof n && t._handleAdd(this);
};
a.prototype.onRemove = function(e) {
var t = e.root;
t instanceof n && t._handleRemove(this);
this.parent = null;
this.resolved = !1;
};
a.prototype.resolve = function() {
if (this.resolved) return this;
this.root instanceof n && (this.resolved = !0);
return this;
};
a.prototype.getOption = function(e) {
return this.options ? this.options[e] : undefined;
};
a.prototype.setOption = function(e, t, i) {
i && this.options && this.options[e] !== undefined || ((this.options || (this.options = {}))[e] = t);
return this;
};
a.prototype.setOptions = function(e, t) {
if (e) for (var i = Object.keys(e), n = 0; n < i.length; ++n) this.setOption(i[n], e[i[n]], t);
return this;
};
a.prototype.toString = function() {
var e = this.constructor.className, t = this.fullName;
return t.length ? e + " " + t : e;
};
a._configure = function(e) {
n = e;
};
}, {
37: 37
} ],
25: [ function(e, t, i) {
t.exports = s;
var n = e(24);
((s.prototype = Object.create(n.prototype)).constructor = s).className = "OneOf";
var o = e(16), a = e(37);
function s(e, t, i, o) {
if (!Array.isArray(t)) {
i = t;
t = undefined;
}
n.call(this, e, i);
if (t !== undefined && !Array.isArray(t)) throw TypeError("fieldNames must be an Array");
this.oneof = t || [];
this.fieldsArray = [];
this.comment = o;
}
s.fromJSON = function(e, t) {
return new s(e, t.oneof, t.options, t.comment);
};
s.prototype.toJSON = function(e) {
var t = !!e && Boolean(e.keepComments);
return a.toObject([ "options", this.options, "oneof", this.oneof, "comment", t ? this.comment : undefined ]);
};
function r(e) {
if (e.parent) for (var t = 0; t < e.fieldsArray.length; ++t) e.fieldsArray[t].parent || e.parent.add(e.fieldsArray[t]);
}
s.prototype.add = function(e) {
if (!(e instanceof o)) throw TypeError("field must be a Field");
e.parent && e.parent !== this.parent && e.parent.remove(e);
this.oneof.push(e.name);
this.fieldsArray.push(e);
e.partOf = this;
r(this);
return this;
};
s.prototype.remove = function(e) {
if (!(e instanceof o)) throw TypeError("field must be a Field");
var t = this.fieldsArray.indexOf(e);
if (t < 0) throw Error(e + " is not a member of " + this);
this.fieldsArray.splice(t, 1);
(t = this.oneof.indexOf(e.name)) > -1 && this.oneof.splice(t, 1);
e.partOf = null;
return this;
};
s.prototype.onAdd = function(e) {
n.prototype.onAdd.call(this, e);
for (var t = 0; t < this.oneof.length; ++t) {
var i = e.get(this.oneof[t]);
if (i && !i.partOf) {
i.partOf = this;
this.fieldsArray.push(i);
}
}
r(this);
};
s.prototype.onRemove = function(e) {
for (var t, i = 0; i < this.fieldsArray.length; ++i) (t = this.fieldsArray[i]).parent && t.parent.remove(t);
n.prototype.onRemove.call(this, e);
};
s.d = function() {
for (var e = new Array(arguments.length), t = 0; t < arguments.length; ) e[t] = arguments[t++];
return function(t, i) {
a.decorateType(t.constructor).add(new s(i, e));
Object.defineProperty(t, i, {
get: a.oneOfGetter(e),
set: a.oneOfSetter(e)
});
};
};
}, {
16: 16,
24: 24,
37: 37
} ],
26: [ function(e, t, i) {
t.exports = T;
T.filename = null;
T.defaults = {
keepCase: !1
};
var n = e(34), o = e(29), a = e(35), s = e(16), r = e(20), c = e(25), l = e(15), u = e(33), h = e(22), d = e(36), g = e(37), f = /^[1-9][0-9]*$/, p = /^-?[1-9][0-9]*$/, m = /^0[x][0-9a-fA-F]+$/, _ = /^-?0[x][0-9a-fA-F]+$/, v = /^0[0-7]+$/, y = /^-?0[0-7]+$/, D = /^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/, b = /^[a-zA-Z_][a-zA-Z_0-9]*$/, w = /^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/, I = /^(?:\.[a-zA-Z_][a-zA-Z_0-9]*)+$/;
function T(e, t, i) {
if (!(t instanceof o)) {
i = t;
t = new o();
}
i || (i = T.defaults);
var C, M, S, L, R, F = n(e, i.alternateCommentMode || !1), O = F.next, A = F.push, B = F.peek, E = F.skip, x = F.cmnt, k = !0, G = !1, U = t, N = i.keepCase ? function(e) {
return e;
} : g.camelCase;
function P(e, t, i) {
var n = T.filename;
i || (T.filename = null);
return Error("illegal " + (t || "token") + " '" + e + "' (" + (n ? n + ", " : "") + "line " + F.line + ")");
}
function W() {
var e, t = [];
do {
if ('"' !== (e = O()) && "'" !== e) throw P(e);
t.push(O());
E(e);
e = B();
} while ('"' === e || "'" === e);
return t.join("");
}
function V(e) {
var t = O();
switch (t) {
case "'":
case '"':
A(t);
return W();

case "true":
case "TRUE":
return !0;

case "false":
case "FALSE":
return !1;
}
try {
return q(t, !0);
} catch (i) {
if (e && w.test(t)) return t;
throw P(t, "value");
}
}
function H(e, t) {
var i, n;
do {
!t || '"' !== (i = B()) && "'" !== i ? e.push([ n = j(O()), E("to", !0) ? j(O()) : n ]) : e.push(W());
} while (E(",", !0));
E(";");
}
function q(e, t) {
var i = 1;
if ("-" === e.charAt(0)) {
i = -1;
e = e.substring(1);
}
switch (e) {
case "inf":
case "INF":
case "Inf":
return Infinity * i;

case "nan":
case "NAN":
case "Nan":
case "NaN":
return NaN;

case "0":
return 0;
}
if (f.test(e)) return i * parseInt(e, 10);
if (m.test(e)) return i * parseInt(e, 16);
if (v.test(e)) return i * parseInt(e, 8);
if (D.test(e)) return i * parseFloat(e);
throw P(e, "number", t);
}
function j(e, t) {
switch (e) {
case "max":
case "MAX":
case "Max":
return 536870911;

case "0":
return 0;
}
if (!t && "-" === e.charAt(0)) throw P(e, "id");
if (p.test(e)) return parseInt(e, 10);
if (_.test(e)) return parseInt(e, 16);
if (y.test(e)) return parseInt(e, 8);
throw P(e, "id");
}
function K() {
if (C !== undefined) throw P("package");
C = O();
if (!w.test(C)) throw P(C, "name");
U = U.define(C);
E(";");
}
function z() {
var e, t = B();
switch (t) {
case "weak":
e = S || (S = []);
O();
break;

case "public":
O();

default:
e = M || (M = []);
}
t = W();
E(";");
e.push(t);
}
function Y() {
E("=");
L = W();
if (!(G = "proto3" === L) && "proto2" !== L) throw P(L, "syntax");
E(";");
}
function X(e, t) {
switch (t) {
case "option":
oe(e, t);
E(";");
return !0;

case "message":
Q(e, t);
return !0;

case "enum":
ie(e, t);
return !0;

case "service":
ce(e, t);
return !0;

case "extend":
ue(e, t);
return !0;
}
return !1;
}
function J(e, t, i) {
var n = F.line;
if (e) {
e.comment = x();
e.filename = T.filename;
}
if (E("{", !0)) {
for (var o; "}" !== (o = O()); ) t(o);
E(";", !0);
} else {
i && i();
E(";");
e && "string" != typeof e.comment && (e.comment = x(n));
}
}
function Q(e, t) {
if (!b.test(t = O())) throw P(t, "type name");
var i = new a(t);
J(i, function(e) {
if (!X(i, e)) switch (e) {
case "map":
ee(i);
break;

case "required":
case "optional":
case "repeated":
Z(i, e);
break;

case "oneof":
te(i, e);
break;

case "extensions":
H(i.extensions || (i.extensions = []));
break;

case "reserved":
H(i.reserved || (i.reserved = []), !0);
break;

default:
if (!G || !w.test(e)) throw P(e);
A(e);
Z(i, "optional");
}
});
e.add(i);
}
function Z(e, t, i) {
var n = O();
if ("group" !== n) {
if (!w.test(n)) throw P(n, "type");
var o = O();
if (!b.test(o)) throw P(o, "name");
o = N(o);
E("=");
var a = new s(o, j(O()), n, t, i);
J(a, function(e) {
if ("option" !== e) throw P(e);
oe(a, e);
E(";");
}, function() {
re(a);
});
e.add(a);
G || !a.repeated || d.packed[n] === undefined && d.basic[n] !== undefined || a.setOption("packed", !1, !0);
} else $(e, t);
}
function $(e, t) {
var i = O();
if (!b.test(i)) throw P(i, "name");
var n = g.lcFirst(i);
i === n && (i = g.ucFirst(i));
E("=");
var o = j(O()), r = new a(i);
r.group = !0;
var c = new s(n, o, i, t);
c.filename = T.filename;
J(r, function(e) {
switch (e) {
case "option":
oe(r, e);
E(";");
break;

case "required":
case "optional":
case "repeated":
Z(r, e);
break;

default:
throw P(e);
}
});
e.add(r).add(c);
}
function ee(e) {
E("<");
var t = O();
if (d.mapKey[t] === undefined) throw P(t, "type");
E(",");
var i = O();
if (!w.test(i)) throw P(i, "type");
E(">");
var n = O();
if (!b.test(n)) throw P(n, "name");
E("=");
var o = new r(N(n), j(O()), t, i);
J(o, function(e) {
if ("option" !== e) throw P(e);
oe(o, e);
E(";");
}, function() {
re(o);
});
e.add(o);
}
function te(e, t) {
if (!b.test(t = O())) throw P(t, "name");
var i = new c(N(t));
J(i, function(e) {
if ("option" === e) {
oe(i, e);
E(";");
} else {
A(e);
Z(i, "optional");
}
});
e.add(i);
}
function ie(e, t) {
if (!b.test(t = O())) throw P(t, "name");
var i = new l(t);
J(i, function(e) {
switch (e) {
case "option":
oe(i, e);
E(";");
break;

case "reserved":
H(i.reserved || (i.reserved = []), !0);
break;

default:
ne(i, e);
}
});
e.add(i);
}
function ne(e, t) {
if (!b.test(t)) throw P(t, "name");
E("=");
var i = j(O(), !0), n = {};
J(n, function(e) {
if ("option" !== e) throw P(e);
oe(n, e);
E(";");
}, function() {
re(n);
});
e.add(t, i, n.comment);
}
function oe(e, t) {
var i = E("(", !0);
if (!w.test(t = O())) throw P(t, "name");
var n = t;
if (i) {
E(")");
n = "(" + n + ")";
t = B();
if (I.test(t)) {
n += t;
O();
}
}
E("=");
ae(e, n);
}
function ae(e, t) {
if (E("{", !0)) do {
if (!b.test(R = O())) throw P(R, "name");
if ("{" === B()) ae(e, t + "." + R); else {
E(":");
"{" === B() ? ae(e, t + "." + R) : se(e, t + "." + R, V(!0));
}
} while (!E("}", !0)); else se(e, t, V(!0));
}
function se(e, t, i) {
e.setOption && e.setOption(t, i);
}
function re(e) {
if (E("[", !0)) {
do {
oe(e, "option");
} while (E(",", !0));
E("]");
}
return e;
}
function ce(e, t) {
if (!b.test(t = O())) throw P(t, "service name");
var i = new u(t);
J(i, function(e) {
if (!X(i, e)) {
if ("rpc" !== e) throw P(e);
le(i, e);
}
});
e.add(i);
}
function le(e, t) {
var i = t;
if (!b.test(t = O())) throw P(t, "name");
var n, o, a, s, r = t;
E("(");
E("stream", !0) && (o = !0);
if (!w.test(t = O())) throw P(t);
n = t;
E(")");
E("returns");
E("(");
E("stream", !0) && (s = !0);
if (!w.test(t = O())) throw P(t);
a = t;
E(")");
var c = new h(r, i, n, a, o, s);
J(c, function(e) {
if ("option" !== e) throw P(e);
oe(c, e);
E(";");
});
e.add(c);
}
function ue(e, t) {
if (!w.test(t = O())) throw P(t, "reference");
var i = t;
J(null, function(t) {
switch (t) {
case "required":
case "repeated":
case "optional":
Z(e, t, i);
break;

default:
if (!G || !w.test(t)) throw P(t);
A(t);
Z(e, "optional", i);
}
});
}
for (;null !== (R = O()); ) switch (R) {
case "package":
if (!k) throw P(R);
K();
break;

case "import":
if (!k) throw P(R);
z();
break;

case "syntax":
if (!k) throw P(R);
Y();
break;

case "option":
if (!k) throw P(R);
oe(U, R);
E(";");
break;

default:
if (X(U, R)) {
k = !1;
continue;
}
throw P(R);
}
T.filename = null;
return {
package: C,
imports: M,
weakImports: S,
syntax: L,
root: t
};
}
}, {
15: 15,
16: 16,
20: 20,
22: 22,
25: 25,
29: 29,
33: 33,
34: 34,
35: 35,
36: 36,
37: 37
} ],
27: [ function(e, t, i) {
t.exports = c;
var n, o = e(39), a = o.LongBits, s = o.utf8;
function r(e, t) {
return RangeError("index out of range: " + e.pos + " + " + (t || 1) + " > " + e.len);
}
function c(e) {
this.buf = e;
this.pos = 0;
this.len = e.length;
}
var l = "undefined" != typeof Uint8Array ? function(e) {
if (e instanceof Uint8Array || Array.isArray(e)) return new c(e);
throw Error("illegal buffer");
} : function(e) {
if (Array.isArray(e)) return new c(e);
throw Error("illegal buffer");
};
c.create = o.Buffer ? function(e) {
return (c.create = function(e) {
return o.Buffer.isBuffer(e) ? new n(e) : l(e);
})(e);
} : l;
c.prototype._slice = o.Array.prototype.subarray || o.Array.prototype.slice;
c.prototype.uint32 = function() {
var e = 4294967295;
return function() {
e = (127 & this.buf[this.pos]) >>> 0;
if (this.buf[this.pos++] < 128) return e;
e = (e | (127 & this.buf[this.pos]) << 7) >>> 0;
if (this.buf[this.pos++] < 128) return e;
e = (e | (127 & this.buf[this.pos]) << 14) >>> 0;
if (this.buf[this.pos++] < 128) return e;
e = (e | (127 & this.buf[this.pos]) << 21) >>> 0;
if (this.buf[this.pos++] < 128) return e;
e = (e | (15 & this.buf[this.pos]) << 28) >>> 0;
if (this.buf[this.pos++] < 128) return e;
if ((this.pos += 5) > this.len) {
this.pos = this.len;
throw r(this, 10);
}
return e;
};
}();
c.prototype.int32 = function() {
return 0 | this.uint32();
};
c.prototype.sint32 = function() {
var e = this.uint32();
return e >>> 1 ^ -(1 & e) | 0;
};
function u() {
var e = new a(0, 0), t = 0;
if (!(this.len - this.pos > 4)) {
for (;t < 3; ++t) {
if (this.pos >= this.len) throw r(this);
e.lo = (e.lo | (127 & this.buf[this.pos]) << 7 * t) >>> 0;
if (this.buf[this.pos++] < 128) return e;
}
e.lo = (e.lo | (127 & this.buf[this.pos++]) << 7 * t) >>> 0;
return e;
}
for (;t < 4; ++t) {
e.lo = (e.lo | (127 & this.buf[this.pos]) << 7 * t) >>> 0;
if (this.buf[this.pos++] < 128) return e;
}
e.lo = (e.lo | (127 & this.buf[this.pos]) << 28) >>> 0;
e.hi = (e.hi | (127 & this.buf[this.pos]) >> 4) >>> 0;
if (this.buf[this.pos++] < 128) return e;
t = 0;
if (this.len - this.pos > 4) for (;t < 5; ++t) {
e.hi = (e.hi | (127 & this.buf[this.pos]) << 7 * t + 3) >>> 0;
if (this.buf[this.pos++] < 128) return e;
} else for (;t < 5; ++t) {
if (this.pos >= this.len) throw r(this);
e.hi = (e.hi | (127 & this.buf[this.pos]) << 7 * t + 3) >>> 0;
if (this.buf[this.pos++] < 128) return e;
}
throw Error("invalid varint encoding");
}
c.prototype.bool = function() {
return 0 !== this.uint32();
};
function h(e, t) {
return (e[t - 4] | e[t - 3] << 8 | e[t - 2] << 16 | e[t - 1] << 24) >>> 0;
}
c.prototype.fixed32 = function() {
if (this.pos + 4 > this.len) throw r(this, 4);
return h(this.buf, this.pos += 4);
};
c.prototype.sfixed32 = function() {
if (this.pos + 4 > this.len) throw r(this, 4);
return 0 | h(this.buf, this.pos += 4);
};
function d() {
if (this.pos + 8 > this.len) throw r(this, 8);
return new a(h(this.buf, this.pos += 4), h(this.buf, this.pos += 4));
}
c.prototype.float = function() {
if (this.pos + 4 > this.len) throw r(this, 4);
var e = o.float.readFloatLE(this.buf, this.pos);
this.pos += 4;
return e;
};
c.prototype.double = function() {
if (this.pos + 8 > this.len) throw r(this, 4);
var e = o.float.readDoubleLE(this.buf, this.pos);
this.pos += 8;
return e;
};
c.prototype.bytes = function() {
var e = this.uint32(), t = this.pos, i = this.pos + e;
if (i > this.len) throw r(this, e);
this.pos += e;
return Array.isArray(this.buf) ? this.buf.slice(t, i) : t === i ? new this.buf.constructor(0) : this._slice.call(this.buf, t, i);
};
c.prototype.string = function() {
var e = this.bytes();
return s.read(e, 0, e.length);
};
c.prototype.skip = function(e) {
if ("number" == typeof e) {
if (this.pos + e > this.len) throw r(this, e);
this.pos += e;
} else do {
if (this.pos >= this.len) throw r(this);
} while (128 & this.buf[this.pos++]);
return this;
};
c.prototype.skipType = function(e) {
switch (e) {
case 0:
this.skip();
break;

case 1:
this.skip(8);
break;

case 2:
this.skip(this.uint32());
break;

case 3:
for (;;) {
if (4 == (e = 7 & this.uint32())) break;
this.skipType(e);
}
break;

case 5:
this.skip(4);
break;

default:
throw Error("invalid wire type " + e + " at offset " + this.pos);
}
return this;
};
c._configure = function(e) {
n = e;
var t = o.Long ? "toLong" : "toNumber";
o.merge(c.prototype, {
int64: function() {
return u.call(this)[t](!1);
},
uint64: function() {
return u.call(this)[t](!0);
},
sint64: function() {
return u.call(this).zzDecode()[t](!1);
},
fixed64: function() {
return d.call(this)[t](!0);
},
sfixed64: function() {
return d.call(this)[t](!1);
}
});
};
}, {
39: 39
} ],
28: [ function(e, t, i) {
t.exports = a;
var n = e(27);
(a.prototype = Object.create(n.prototype)).constructor = a;
var o = e(39);
function a(e) {
n.call(this, e);
}
o.Buffer && (a.prototype._slice = o.Buffer.prototype.slice);
a.prototype.string = function() {
var e = this.uint32();
return this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + e, this.len));
};
}, {
27: 27,
39: 39
} ],
29: [ function(e, t, i) {
t.exports = h;
var n = e(23);
((h.prototype = Object.create(n.prototype)).constructor = h).className = "Root";
var o, a, s, r = e(16), c = e(15), l = e(25), u = e(37);
function h(e) {
n.call(this, "", e);
this.deferred = [];
this.files = [];
}
h.fromJSON = function(e, t) {
t || (t = new h());
e.options && t.setOptions(e.options);
return t.addJSON(e.nested);
};
h.prototype.resolvePath = u.path.resolve;
function d() {}
h.prototype.load = function e(t, i, n) {
if ("function" == typeof i) {
n = i;
i = undefined;
}
var o = this;
if (!n) return u.asPromise(e, o, t, i);
var r = n === d;
function c(e, t) {
if (n) {
var i = n;
n = null;
if (r) throw e;
i(e, t);
}
}
function l(e, t) {
try {
u.isString(t) && "{" === t.charAt(0) && (t = JSON.parse(t));
if (u.isString(t)) {
a.filename = e;
var n, s = a(t, o, i), l = 0;
if (s.imports) for (;l < s.imports.length; ++l) (n = o.resolvePath(e, s.imports[l])) && h(n);
if (s.weakImports) for (l = 0; l < s.weakImports.length; ++l) (n = o.resolvePath(e, s.weakImports[l])) && h(n, !0);
} else o.setOptions(t.options).addJSON(t.nested);
} catch (e) {
c(e);
}
r || g || c(null, o);
}
function h(e, t) {
var i = e.lastIndexOf("google/protobuf/");
if (i > -1) {
var a = e.substring(i);
a in s && (e = a);
}
if (!(o.files.indexOf(e) > -1)) {
o.files.push(e);
if (e in s) if (r) l(e, s[e]); else {
++g;
setTimeout(function() {
--g;
l(e, s[e]);
});
} else if (r) {
var h;
try {
h = u.fs.readFileSync(e).toString("utf8");
} catch (e) {
t || c(e);
return;
}
l(e, h);
} else {
++g;
u.fetch(e, function(i, a) {
--g;
n && (i ? t ? g || c(null, o) : c(i) : l(e, a));
});
}
}
}
var g = 0;
u.isString(t) && (t = [ t ]);
for (var f, p = 0; p < t.length; ++p) (f = o.resolvePath("", t[p])) && h(f);
if (r) return o;
g || c(null, o);
return undefined;
};
h.prototype.loadSync = function(e, t) {
if (!u.isNode) throw Error("not supported");
return this.load(e, t, d);
};
h.prototype.resolveAll = function() {
if (this.deferred.length) throw Error("unresolvable extensions: " + this.deferred.map(function(e) {
return "'extend " + e.extend + "' in " + e.parent.fullName;
}).join(", "));
return n.prototype.resolveAll.call(this);
};
var g = /^[A-Z]/;
function f(e, t) {
var i = t.parent.lookup(t.extend);
if (i) {
var n = new r(t.fullName, t.id, t.type, t.rule, undefined, t.options);
n.declaringField = t;
t.extensionField = n;
i.add(n);
return !0;
}
return !1;
}
h.prototype._handleAdd = function(e) {
if (e instanceof r) e.extend === undefined || e.extensionField || f(0, e) || this.deferred.push(e); else if (e instanceof c) g.test(e.name) && (e.parent[e.name] = e.values); else if (!(e instanceof l)) {
if (e instanceof o) for (var t = 0; t < this.deferred.length; ) f(0, this.deferred[t]) ? this.deferred.splice(t, 1) : ++t;
for (var i = 0; i < e.nestedArray.length; ++i) this._handleAdd(e._nestedArray[i]);
g.test(e.name) && (e.parent[e.name] = e);
}
};
h.prototype._handleRemove = function(e) {
if (e instanceof r) {
if (e.extend !== undefined) if (e.extensionField) {
e.extensionField.parent.remove(e.extensionField);
e.extensionField = null;
} else {
var t = this.deferred.indexOf(e);
t > -1 && this.deferred.splice(t, 1);
}
} else if (e instanceof c) g.test(e.name) && delete e.parent[e.name]; else if (e instanceof n) {
for (var i = 0; i < e.nestedArray.length; ++i) this._handleRemove(e._nestedArray[i]);
g.test(e.name) && delete e.parent[e.name];
}
};
h._configure = function(e, t, i) {
o = e;
a = t;
s = i;
};
}, {
15: 15,
16: 16,
23: 23,
25: 25,
37: 37
} ],
30: [ function(e, t, i) {
t.exports = {};
}, {} ],
31: [ function(e, t, i) {
i.Service = e(32);
}, {
32: 32
} ],
32: [ function(e, t, i) {
t.exports = o;
var n = e(39);
(o.prototype = Object.create(n.EventEmitter.prototype)).constructor = o;
function o(e, t, i) {
if ("function" != typeof e) throw TypeError("rpcImpl must be a function");
n.EventEmitter.call(this);
this.rpcImpl = e;
this.requestDelimited = Boolean(t);
this.responseDelimited = Boolean(i);
}
o.prototype.rpcCall = function e(t, i, o, a, s) {
if (!a) throw TypeError("request must be specified");
var r = this;
if (!s) return n.asPromise(e, r, t, i, o, a);
if (!r.rpcImpl) {
setTimeout(function() {
s(Error("already ended"));
}, 0);
return undefined;
}
try {
return r.rpcImpl(t, i[r.requestDelimited ? "encodeDelimited" : "encode"](a).finish(), function(e, i) {
if (e) {
r.emit("error", e, t);
return s(e);
}
if (null === i) {
r.end(!0);
return undefined;
}
if (!(i instanceof o)) try {
i = o[r.responseDelimited ? "decodeDelimited" : "decode"](i);
} catch (e) {
r.emit("error", e, t);
return s(e);
}
r.emit("data", i, t);
return s(null, i);
});
} catch (e) {
r.emit("error", e, t);
setTimeout(function() {
s(e);
}, 0);
return undefined;
}
};
o.prototype.end = function(e) {
if (this.rpcImpl) {
e || this.rpcImpl(null, null, null);
this.rpcImpl = null;
this.emit("end").off();
}
return this;
};
}, {
39: 39
} ],
33: [ function(e, t, i) {
t.exports = r;
var n = e(23);
((r.prototype = Object.create(n.prototype)).constructor = r).className = "Service";
var o = e(22), a = e(37), s = e(31);
function r(e, t) {
n.call(this, e, t);
this.methods = {};
this._methodsArray = null;
}
r.fromJSON = function(e, t) {
var i = new r(e, t.options);
if (t.methods) for (var n = Object.keys(t.methods), a = 0; a < n.length; ++a) i.add(o.fromJSON(n[a], t.methods[n[a]]));
t.nested && i.addJSON(t.nested);
i.comment = t.comment;
return i;
};
r.prototype.toJSON = function(e) {
var t = n.prototype.toJSON.call(this, e), i = !!e && Boolean(e.keepComments);
return a.toObject([ "options", t && t.options || undefined, "methods", n.arrayToJSON(this.methodsArray, e) || {}, "nested", t && t.nested || undefined, "comment", i ? this.comment : undefined ]);
};
Object.defineProperty(r.prototype, "methodsArray", {
get: function() {
return this._methodsArray || (this._methodsArray = a.toArray(this.methods));
}
});
function c(e) {
e._methodsArray = null;
return e;
}
r.prototype.get = function(e) {
return this.methods[e] || n.prototype.get.call(this, e);
};
r.prototype.resolveAll = function() {
for (var e = this.methodsArray, t = 0; t < e.length; ++t) e[t].resolve();
return n.prototype.resolve.call(this);
};
r.prototype.add = function(e) {
if (this.get(e.name)) throw Error("duplicate name '" + e.name + "' in " + this);
if (e instanceof o) {
this.methods[e.name] = e;
e.parent = this;
return c(this);
}
return n.prototype.add.call(this, e);
};
r.prototype.remove = function(e) {
if (e instanceof o) {
if (this.methods[e.name] !== e) throw Error(e + " is not a member of " + this);
delete this.methods[e.name];
e.parent = null;
return c(this);
}
return n.prototype.remove.call(this, e);
};
r.prototype.create = function(e, t, i) {
for (var n, o = new s.Service(e, t, i), r = 0; r < this.methodsArray.length; ++r) {
var c = a.lcFirst((n = this._methodsArray[r]).resolve().name).replace(/[^$\w_]/g, "");
o[c] = a.codegen([ "r", "c" ], a.isReserved(c) ? c + "_" : c)("return this.rpcCall(m,q,s,r,c)")({
m: n,
q: n.resolvedRequestType.ctor,
s: n.resolvedResponseType.ctor
});
}
return o;
};
}, {
22: 22,
23: 23,
31: 31,
37: 37
} ],
34: [ function(e, t, i) {
t.exports = g;
var n = /[\s{}=;:[\],'"()<>]/g, o = /(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g, a = /(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g, s = /^ *[*/]+ */, r = /^\s*\*?\/*/, c = /\n/g, l = /\s/, u = /\\(.?)/g, h = {
0: "\0",
r: "\r",
n: "\n",
t: "\t"
};
function d(e) {
return e.replace(u, function(e, t) {
switch (t) {
case "\\":
case "":
return t;

default:
return h[t] || "";
}
});
}
g.unescape = d;
function g(e, t) {
var i = 0, u = (e = e.toString()).length, h = 1, g = null, f = null, p = 0, m = !1, _ = [], v = null;
function y(e) {
return Error("illegal " + e + " (line " + h + ")");
}
function D() {
var t = "'" === v ? a : o;
t.lastIndex = i - 1;
var n = t.exec(e);
if (!n) throw y("string");
i = t.lastIndex;
M(v);
v = null;
return d(n[1]);
}
function b(t) {
return e.charAt(t);
}
function w(i, n) {
g = e.charAt(i++);
p = h;
m = !1;
var o, a = i - (t ? 2 : 3);
do {
if (--a < 0 || "\n" === (o = e.charAt(a))) {
m = !0;
break;
}
} while (" " === o || "\t" === o);
for (var l = e.substring(i, n).split(c), u = 0; u < l.length; ++u) l[u] = l[u].replace(t ? r : s, "").trim();
f = l.join("\n").trim();
}
function I(t) {
var i = T(t), n = e.substring(t, i);
return /^\s*\/{1,2}/.test(n);
}
function T(e) {
for (var t = e; t < u && "\n" !== b(t); ) t++;
return t;
}
function C() {
if (_.length > 0) return _.shift();
if (v) return D();
var o, a, s, r, c;
do {
if (i === u) return null;
o = !1;
for (;l.test(s = b(i)); ) {
"\n" === s && ++h;
if (++i === u) return null;
}
if ("/" === b(i)) {
if (++i === u) throw y("comment");
if ("/" === b(i)) if (t) {
r = i;
c = !1;
if (I(i)) {
c = !0;
do {
if ((i = T(i)) === u) break;
i++;
} while (I(i));
} else i = Math.min(u, T(i) + 1);
c && w(r, i);
h++;
o = !0;
} else {
c = "/" === b(r = i + 1);
for (;"\n" !== b(++i); ) if (i === u) return null;
++i;
c && w(r, i - 1);
++h;
o = !0;
} else {
if ("*" !== (s = b(i))) return "/";
r = i + 1;
c = t || "*" === b(r);
do {
"\n" === s && ++h;
if (++i === u) throw y("comment");
a = s;
s = b(i);
} while ("*" !== a || "/" !== s);
++i;
c && w(r, i - 2);
o = !0;
}
}
} while (o);
var d = i;
n.lastIndex = 0;
if (!n.test(b(d++))) for (;d < u && !n.test(b(d)); ) ++d;
var g = e.substring(i, i = d);
'"' !== g && "'" !== g || (v = g);
return g;
}
function M(e) {
_.push(e);
}
function S() {
if (!_.length) {
var e = C();
if (null === e) return null;
M(e);
}
return _[0];
}
return Object.defineProperty({
next: C,
peek: S,
push: M,
skip: function(e, t) {
var i = S();
if (i === e) {
C();
return !0;
}
if (!t) throw y("token '" + i + "', '" + e + "' expected");
return !1;
},
cmnt: function(e) {
var i = null;
if (e === undefined) p === h - 1 && (t || "*" === g || m) && (i = f); else {
p < e && S();
p !== e || m || !t && "/" !== g || (i = f);
}
return i;
}
}, "line", {
get: function() {
return h;
}
});
}
}, {} ],
35: [ function(e, t, i) {
t.exports = v;
var n = e(23);
((v.prototype = Object.create(n.prototype)).constructor = v).className = "Type";
var o = e(15), a = e(25), s = e(16), r = e(20), c = e(33), l = e(21), u = e(27), h = e(42), d = e(37), g = e(14), f = e(13), p = e(40), m = e(12), _ = e(41);
function v(e, t) {
n.call(this, e, t);
this.fields = {};
this.oneofs = undefined;
this.extensions = undefined;
this.reserved = undefined;
this.group = undefined;
this._fieldsById = null;
this._fieldsArray = null;
this._oneofsArray = null;
this._ctor = null;
}
Object.defineProperties(v.prototype, {
fieldsById: {
get: function() {
if (this._fieldsById) return this._fieldsById;
this._fieldsById = {};
for (var e = Object.keys(this.fields), t = 0; t < e.length; ++t) {
var i = this.fields[e[t]], n = i.id;
if (this._fieldsById[n]) throw Error("duplicate id " + n + " in " + this);
this._fieldsById[n] = i;
}
return this._fieldsById;
}
},
fieldsArray: {
get: function() {
return this._fieldsArray || (this._fieldsArray = d.toArray(this.fields));
}
},
oneofsArray: {
get: function() {
return this._oneofsArray || (this._oneofsArray = d.toArray(this.oneofs));
}
},
ctor: {
get: function() {
return this._ctor || (this.ctor = v.generateConstructor(this)());
},
set: function(e) {
var t = e.prototype;
if (!(t instanceof l)) {
(e.prototype = new l()).constructor = e;
d.merge(e.prototype, t);
}
e.$type = e.prototype.$type = this;
d.merge(e, l, !0);
this._ctor = e;
for (var i = 0; i < this.fieldsArray.length; ++i) this._fieldsArray[i].resolve();
var n = {};
for (i = 0; i < this.oneofsArray.length; ++i) n[this._oneofsArray[i].resolve().name] = {
get: d.oneOfGetter(this._oneofsArray[i].oneof),
set: d.oneOfSetter(this._oneofsArray[i].oneof)
};
i && Object.defineProperties(e.prototype, n);
}
}
});
v.generateConstructor = function(e) {
for (var t, i = d.codegen([ "p" ], e.name), n = 0; n < e.fieldsArray.length; ++n) (t = e._fieldsArray[n]).map ? i("this%s={}", d.safeProp(t.name)) : t.repeated && i("this%s=[]", d.safeProp(t.name));
return i("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]");
};
function y(e) {
e._fieldsById = e._fieldsArray = e._oneofsArray = null;
delete e.encode;
delete e.decode;
delete e.verify;
return e;
}
v.fromJSON = function(e, t) {
var i = new v(e, t.options);
i.extensions = t.extensions;
i.reserved = t.reserved;
for (var l = Object.keys(t.fields), u = 0; u < l.length; ++u) i.add(("undefined" != typeof t.fields[l[u]].keyType ? r.fromJSON : s.fromJSON)(l[u], t.fields[l[u]]));
if (t.oneofs) for (l = Object.keys(t.oneofs), u = 0; u < l.length; ++u) i.add(a.fromJSON(l[u], t.oneofs[l[u]]));
if (t.nested) for (l = Object.keys(t.nested), u = 0; u < l.length; ++u) {
var h = t.nested[l[u]];
i.add((h.id !== undefined ? s.fromJSON : h.fields !== undefined ? v.fromJSON : h.values !== undefined ? o.fromJSON : h.methods !== undefined ? c.fromJSON : n.fromJSON)(l[u], h));
}
t.extensions && t.extensions.length && (i.extensions = t.extensions);
t.reserved && t.reserved.length && (i.reserved = t.reserved);
t.group && (i.group = !0);
t.comment && (i.comment = t.comment);
return i;
};
v.prototype.toJSON = function(e) {
var t = n.prototype.toJSON.call(this, e), i = !!e && Boolean(e.keepComments);
return d.toObject([ "options", t && t.options || undefined, "oneofs", n.arrayToJSON(this.oneofsArray, e), "fields", n.arrayToJSON(this.fieldsArray.filter(function(e) {
return !e.declaringField;
}), e) || {}, "extensions", this.extensions && this.extensions.length ? this.extensions : undefined, "reserved", this.reserved && this.reserved.length ? this.reserved : undefined, "group", this.group || undefined, "nested", t && t.nested || undefined, "comment", i ? this.comment : undefined ]);
};
v.prototype.resolveAll = function() {
for (var e = this.fieldsArray, t = 0; t < e.length; ) e[t++].resolve();
var i = this.oneofsArray;
t = 0;
for (;t < i.length; ) i[t++].resolve();
return n.prototype.resolveAll.call(this);
};
v.prototype.get = function(e) {
return this.fields[e] || this.oneofs && this.oneofs[e] || this.nested && this.nested[e] || null;
};
v.prototype.add = function(e) {
if (this.get(e.name)) throw Error("duplicate name '" + e.name + "' in " + this);
if (e instanceof s && e.extend === undefined) {
if (this._fieldsById ? this._fieldsById[e.id] : this.fieldsById[e.id]) throw Error("duplicate id " + e.id + " in " + this);
if (this.isReservedId(e.id)) throw Error("id " + e.id + " is reserved in " + this);
if (this.isReservedName(e.name)) throw Error("name '" + e.name + "' is reserved in " + this);
e.parent && e.parent.remove(e);
this.fields[e.name] = e;
e.message = this;
e.onAdd(this);
return y(this);
}
if (e instanceof a) {
this.oneofs || (this.oneofs = {});
this.oneofs[e.name] = e;
e.onAdd(this);
return y(this);
}
return n.prototype.add.call(this, e);
};
v.prototype.remove = function(e) {
if (e instanceof s && e.extend === undefined) {
if (!this.fields || this.fields[e.name] !== e) throw Error(e + " is not a member of " + this);
delete this.fields[e.name];
e.parent = null;
e.onRemove(this);
return y(this);
}
if (e instanceof a) {
if (!this.oneofs || this.oneofs[e.name] !== e) throw Error(e + " is not a member of " + this);
delete this.oneofs[e.name];
e.parent = null;
e.onRemove(this);
return y(this);
}
return n.prototype.remove.call(this, e);
};
v.prototype.isReservedId = function(e) {
return n.isReservedId(this.reserved, e);
};
v.prototype.isReservedName = function(e) {
return n.isReservedName(this.reserved, e);
};
v.prototype.create = function(e) {
return new this.ctor(e);
};
v.prototype.setup = function() {
for (var e = this.fullName, t = [], i = 0; i < this.fieldsArray.length; ++i) t.push(this._fieldsArray[i].resolve().resolvedType);
this.encode = g(this)({
Writer: h,
types: t,
util: d
});
this.decode = f(this)({
Reader: u,
types: t,
util: d
});
this.verify = p(this)({
types: t,
util: d
});
this.fromObject = m.fromObject(this)({
types: t,
util: d
});
this.toObject = m.toObject(this)({
types: t,
util: d
});
var n = _[e];
if (n) {
var o = Object.create(this);
o.fromObject = this.fromObject;
this.fromObject = n.fromObject.bind(o);
o.toObject = this.toObject;
this.toObject = n.toObject.bind(o);
}
return this;
};
v.prototype.encode = function(e, t) {
return this.setup().encode(e, t);
};
v.prototype.encodeDelimited = function(e, t) {
return this.encode(e, t && t.len ? t.fork() : t).ldelim();
};
v.prototype.decode = function(e, t) {
return this.setup().decode(e, t);
};
v.prototype.decodeDelimited = function(e) {
e instanceof u || (e = u.create(e));
return this.decode(e, e.uint32());
};
v.prototype.verify = function(e) {
return this.setup().verify(e);
};
v.prototype.fromObject = function(e) {
return this.setup().fromObject(e);
};
v.prototype.toObject = function(e, t) {
return this.setup().toObject(e, t);
};
v.d = function(e) {
return function(t) {
d.decorateType(t, e);
};
};
}, {
12: 12,
13: 13,
14: 14,
15: 15,
16: 16,
20: 20,
21: 21,
23: 23,
25: 25,
27: 27,
33: 33,
37: 37,
40: 40,
41: 41,
42: 42
} ],
36: [ function(e, t, i) {
var n = i, o = e(37), a = [ "double", "float", "int32", "uint32", "sint32", "fixed32", "sfixed32", "int64", "uint64", "sint64", "fixed64", "sfixed64", "bool", "string", "bytes" ];
function s(e, t) {
var i = 0, n = {};
t |= 0;
for (;i < e.length; ) n[a[i + t]] = e[i++];
return n;
}
n.basic = s([ 1, 5, 0, 0, 0, 5, 5, 0, 0, 0, 1, 1, 0, 2, 2 ]);
n.defaults = s([ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, !1, "", o.emptyArray, null ]);
n.long = s([ 0, 0, 0, 1, 1 ], 7);
n.mapKey = s([ 0, 0, 0, 5, 5, 0, 0, 0, 1, 1, 0, 2 ], 2);
n.packed = s([ 1, 5, 0, 0, 0, 5, 5, 0, 0, 0, 1, 1, 0 ]);
}, {
37: 37
} ],
37: [ function(e, t, i) {
var n, o, a = t.exports = e(39), s = e(30);
a.codegen = e(3);
a.fetch = e(5);
a.path = e(8);
a.fs = a.inquire("fs");
a.toArray = function(e) {
if (e) {
for (var t = Object.keys(e), i = new Array(t.length), n = 0; n < t.length; ) i[n] = e[t[n++]];
return i;
}
return [];
};
a.toObject = function(e) {
for (var t = {}, i = 0; i < e.length; ) {
var n = e[i++], o = e[i++];
o !== undefined && (t[n] = o);
}
return t;
};
var r = /\\/g, c = /"/g;
a.isReserved = function(e) {
return /^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(e);
};
a.safeProp = function(e) {
return !/^[$\w_]+$/.test(e) || a.isReserved(e) ? '["' + e.replace(r, "\\\\").replace(c, '\\"') + '"]' : "." + e;
};
a.ucFirst = function(e) {
return e.charAt(0).toUpperCase() + e.substring(1);
};
var l = /_([a-z])/g;
a.camelCase = function(e) {
return e.substring(0, 1) + e.substring(1).replace(l, function(e, t) {
return t.toUpperCase();
});
};
a.compareFieldsById = function(e, t) {
return e.id - t.id;
};
a.decorateType = function(t, i) {
if (t.$type) {
if (i && t.$type.name !== i) {
a.decorateRoot.remove(t.$type);
t.$type.name = i;
a.decorateRoot.add(t.$type);
}
return t.$type;
}
n || (n = e(35));
var o = new n(i || t.name);
a.decorateRoot.add(o);
o.ctor = t;
Object.defineProperty(t, "$type", {
value: o,
enumerable: !1
});
Object.defineProperty(t.prototype, "$type", {
value: o,
enumerable: !1
});
return o;
};
var u = 0;
a.decorateEnum = function(t) {
if (t.$type) return t.$type;
o || (o = e(15));
var i = new o("Enum" + u++, t);
a.decorateRoot.add(i);
Object.defineProperty(t, "$type", {
value: i,
enumerable: !1
});
return i;
};
Object.defineProperty(a, "decorateRoot", {
get: function() {
return s.decorated || (s.decorated = new (e(29))());
}
});
}, {
15: 15,
29: 29,
3: 3,
30: 30,
35: 35,
39: 39,
5: 5,
8: 8
} ],
38: [ function(e, t, i) {
t.exports = o;
var n = e(39);
function o(e, t) {
this.lo = e >>> 0;
this.hi = t >>> 0;
}
var a = o.zero = new o(0, 0);
a.toNumber = function() {
return 0;
};
a.zzEncode = a.zzDecode = function() {
return this;
};
a.length = function() {
return 1;
};
var s = o.zeroHash = "\0\0\0\0\0\0\0\0";
o.fromNumber = function(e) {
if (0 === e) return a;
var t = e < 0;
t && (e = -e);
var i = e >>> 0, n = (e - i) / 4294967296 >>> 0;
if (t) {
n = ~n >>> 0;
i = ~i >>> 0;
if (++i > 4294967295) {
i = 0;
++n > 4294967295 && (n = 0);
}
}
return new o(i, n);
};
o.from = function(e) {
if ("number" == typeof e) return o.fromNumber(e);
if (n.isString(e)) {
if (!n.Long) return o.fromNumber(parseInt(e, 10));
e = n.Long.fromString(e);
}
return e.low || e.high ? new o(e.low >>> 0, e.high >>> 0) : a;
};
o.prototype.toNumber = function(e) {
if (!e && this.hi >>> 31) {
var t = 1 + ~this.lo >>> 0, i = ~this.hi >>> 0;
t || (i = i + 1 >>> 0);
return -(t + 4294967296 * i);
}
return this.lo + 4294967296 * this.hi;
};
o.prototype.toLong = function(e) {
return n.Long ? new n.Long(0 | this.lo, 0 | this.hi, Boolean(e)) : {
low: 0 | this.lo,
high: 0 | this.hi,
unsigned: Boolean(e)
};
};
var r = String.prototype.charCodeAt;
o.fromHash = function(e) {
return e === s ? a : new o((r.call(e, 0) | r.call(e, 1) << 8 | r.call(e, 2) << 16 | r.call(e, 3) << 24) >>> 0, (r.call(e, 4) | r.call(e, 5) << 8 | r.call(e, 6) << 16 | r.call(e, 7) << 24) >>> 0);
};
o.prototype.toHash = function() {
return String.fromCharCode(255 & this.lo, this.lo >>> 8 & 255, this.lo >>> 16 & 255, this.lo >>> 24, 255 & this.hi, this.hi >>> 8 & 255, this.hi >>> 16 & 255, this.hi >>> 24);
};
o.prototype.zzEncode = function() {
var e = this.hi >> 31;
this.hi = ((this.hi << 1 | this.lo >>> 31) ^ e) >>> 0;
this.lo = (this.lo << 1 ^ e) >>> 0;
return this;
};
o.prototype.zzDecode = function() {
var e = -(1 & this.lo);
this.lo = ((this.lo >>> 1 | this.hi << 31) ^ e) >>> 0;
this.hi = (this.hi >>> 1 ^ e) >>> 0;
return this;
};
o.prototype.length = function() {
var e = this.lo, t = (this.lo >>> 28 | this.hi << 4) >>> 0, i = this.hi >>> 24;
return 0 === i ? 0 === t ? e < 16384 ? e < 128 ? 1 : 2 : e < 2097152 ? 3 : 4 : t < 16384 ? t < 128 ? 5 : 6 : t < 2097152 ? 7 : 8 : i < 128 ? 9 : 10;
};
}, {
39: 39
} ],
39: [ function(e, t, i) {
var n = i;
n.asPromise = e(1);
n.base64 = e(2);
n.EventEmitter = e(4);
n.float = e(6);
n.inquire = e(7);
n.utf8 = e(10);
n.pool = e(9);
n.LongBits = e(38);
n.emptyArray = Object.freeze ? Object.freeze([]) : [];
n.emptyObject = Object.freeze ? Object.freeze({}) : {};
n.isNode = Boolean(global.process && global.process.versions && global.process.versions.node);
n.isInteger = Number.isInteger || function(e) {
return "number" == typeof e && isFinite(e) && Math.floor(e) === e;
};
n.isString = function(e) {
return "string" == typeof e || e instanceof String;
};
n.isObject = function(e) {
return e && "object" === ("undefined" == typeof e ? "undefined" : _typeof(e));
};
n.isset = n.isSet = function(e, t) {
var i = e[t];
return !(null == i || !e.hasOwnProperty(t)) && ("object" !== ("undefined" == typeof i ? "undefined" : _typeof(i)) || (Array.isArray(i) ? i.length : Object.keys(i).length) > 0);
};
n.Buffer = function() {
try {
var e = n.inquire("buffer").Buffer;
return e.prototype.utf8Write ? e : null;
} catch (e) {
return null;
}
}();
n._Buffer_from = null;
n._Buffer_allocUnsafe = null;
n.newBuffer = function(e) {
return "number" == typeof e ? n.Buffer ? n._Buffer_allocUnsafe(e) : new n.Array(e) : n.Buffer ? n._Buffer_from(e) : "undefined" == typeof Uint8Array ? e : new Uint8Array(e);
};
n.Array = "undefined" != typeof Uint8Array ? Uint8Array : Array;
n.Long = global.dcodeIO && global.dcodeIO.Long || n.inquire("long");
n.key2Re = /^true|false|0|1$/;
n.key32Re = /^-?(?:0|[1-9][0-9]*)$/;
n.key64Re = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;
n.longToHash = function(e) {
return e ? n.LongBits.from(e).toHash() : n.LongBits.zeroHash;
};
n.longFromHash = function(e, t) {
var i = n.LongBits.fromHash(e);
return n.Long ? n.Long.fromBits(i.lo, i.hi, t) : i.toNumber(Boolean(t));
};
function o(e, t, i) {
for (var n = Object.keys(t), o = 0; o < n.length; ++o) e[n[o]] !== undefined && i || (e[n[o]] = t[n[o]]);
return e;
}
n.merge = o;
n.lcFirst = function(e) {
return e.charAt(0).toLowerCase() + e.substring(1);
};
function a(e) {
function t(e, i) {
if (!(this instanceof t)) return new t(e, i);
Object.defineProperty(this, "message", {
get: function() {
return e;
}
});
Error.captureStackTrace ? Error.captureStackTrace(this, t) : Object.defineProperty(this, "stack", {
value: new Error().stack || ""
});
i && o(this, i);
}
(t.prototype = Object.create(Error.prototype)).constructor = t;
Object.defineProperty(t.prototype, "name", {
get: function() {
return e;
}
});
t.prototype.toString = function() {
return this.name + ": " + this.message;
};
return t;
}
n.newError = a;
n.ProtocolError = a("ProtocolError");
n.oneOfGetter = function(e) {
for (var t = {}, i = 0; i < e.length; ++i) t[e[i]] = 1;
return function() {
for (var e = Object.keys(this), i = e.length - 1; i > -1; --i) if (1 === t[e[i]] && this[e[i]] !== undefined && null !== this[e[i]]) return e[i];
};
};
n.oneOfSetter = function(e) {
return function(t) {
for (var i = 0; i < e.length; ++i) e[i] !== t && delete this[e[i]];
};
};
n.toJSONOptions = {
longs: String,
enums: String,
bytes: String,
json: !0
};
n._configure = function() {
var e = n.Buffer;
if (e) {
n._Buffer_from = e.from !== Uint8Array.from && e.from || function(t, i) {
return new e(t, i);
};
n._Buffer_allocUnsafe = e.allocUnsafe || function(t) {
return new e(t);
};
} else n._Buffer_from = n._Buffer_allocUnsafe = null;
};
}, {
1: 1,
10: 10,
2: 2,
38: 38,
4: 4,
6: 6,
7: 7,
9: 9
} ],
40: [ function(e, t, i) {
t.exports = function(e) {
var t = o.codegen([ "m" ], e.name + "$verify")('if(typeof m!=="object"||m===null)')("return%j", "object expected"), i = {};
e.oneofsArray.length && t("var p={}");
for (var n = 0; n < e.fieldsArray.length; ++n) {
var c = e._fieldsArray[n].resolve(), l = "m" + o.safeProp(c.name);
c.optional && t("if(%s!=null&&m.hasOwnProperty(%j)){", l, c.name);
if (c.map) {
t("if(!util.isObject(%s))", l)("return%j", a(c, "object"))("var k=Object.keys(%s)", l)("for(var i=0;i<k.length;++i){");
r(t, c, "k[i]");
s(t, c, n, l + "[k[i]]")("}");
} else if (c.repeated) {
t("if(!Array.isArray(%s))", l)("return%j", a(c, "array"))("for(var i=0;i<%s.length;++i){", l);
s(t, c, n, l + "[i]")("}");
} else {
if (c.partOf) {
var u = o.safeProp(c.partOf.name);
1 === i[c.partOf.name] && t("if(p%s===1)", u)("return%j", c.partOf.name + ": multiple values");
i[c.partOf.name] = 1;
t("p%s=1", u);
}
s(t, c, n, l);
}
c.optional && t("}");
}
return t("return null");
};
var n = e(15), o = e(37);
function a(e, t) {
return e.name + ": " + t + (e.repeated && "array" !== t ? "[]" : e.map && "object" !== t ? "{k:" + e.keyType + "}" : "") + " expected";
}
function s(e, t, i, o) {
if (t.resolvedType) if (t.resolvedType instanceof n) {
e("switch(%s){", o)("default:")("return%j", a(t, "enum value"));
for (var s = Object.keys(t.resolvedType.values), r = 0; r < s.length; ++r) e("case %i:", t.resolvedType.values[s[r]]);
e("break")("}");
} else e("{")("var e=types[%i].verify(%s);", i, o)("if(e)")("return%j+e", t.name + ".")("}"); else switch (t.type) {
case "int32":
case "uint32":
case "sint32":
case "fixed32":
case "sfixed32":
e("if(!util.isInteger(%s))", o)("return%j", a(t, "integer"));
break;

case "int64":
case "uint64":
case "sint64":
case "fixed64":
case "sfixed64":
e("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))", o, o, o, o)("return%j", a(t, "integer|Long"));
break;

case "float":
case "double":
e('if(typeof %s!=="number")', o)("return%j", a(t, "number"));
break;

case "bool":
e('if(typeof %s!=="boolean")', o)("return%j", a(t, "boolean"));
break;

case "string":
e("if(!util.isString(%s))", o)("return%j", a(t, "string"));
break;

case "bytes":
e('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))', o, o, o)("return%j", a(t, "buffer"));
}
return e;
}
function r(e, t, i) {
switch (t.keyType) {
case "int32":
case "uint32":
case "sint32":
case "fixed32":
case "sfixed32":
e("if(!util.key32Re.test(%s))", i)("return%j", a(t, "integer key"));
break;

case "int64":
case "uint64":
case "sint64":
case "fixed64":
case "sfixed64":
e("if(!util.key64Re.test(%s))", i)("return%j", a(t, "integer|Long key"));
break;

case "bool":
e("if(!util.key2Re.test(%s))", i)("return%j", a(t, "boolean key"));
}
return e;
}
}, {
15: 15,
37: 37
} ],
41: [ function(e, t, i) {
var n = i, o = e(21);
n[".google.protobuf.Any"] = {
fromObject: function(e) {
if (e && e["@type"]) {
var t = this.lookup(e["@type"]);
if (t) {
var i = "." === e["@type"].charAt(0) ? e["@type"].substr(1) : e["@type"];
return this.create({
type_url: "/" + i,
value: t.encode(t.fromObject(e)).finish()
});
}
}
return this.fromObject(e);
},
toObject: function(e, t) {
if (t && t.json && e.type_url && e.value) {
var i = e.type_url.substring(e.type_url.lastIndexOf("/") + 1), n = this.lookup(i);
n && (e = n.decode(e.value));
}
if (!(e instanceof this.ctor) && e instanceof o) {
var a = e.$type.toObject(e, t);
a["@type"] = e.$type.fullName;
return a;
}
return this.toObject(e, t);
}
};
}, {
21: 21
} ],
42: [ function(e, t, i) {
t.exports = h;
var n, o = e(39), a = o.LongBits, s = o.base64, r = o.utf8;
function c(e, t, i) {
this.fn = e;
this.len = t;
this.next = undefined;
this.val = i;
}
function l() {}
function u(e) {
this.head = e.head;
this.tail = e.tail;
this.len = e.len;
this.next = e.states;
}
function h() {
this.len = 0;
this.head = new c(l, 0, 0);
this.tail = this.head;
this.states = null;
}
h.create = o.Buffer ? function() {
return (h.create = function() {
return new n();
})();
} : function() {
return new h();
};
h.alloc = function(e) {
return new o.Array(e);
};
o.Array !== Array && (h.alloc = o.pool(h.alloc, o.Array.prototype.subarray));
h.prototype._push = function(e, t, i) {
this.tail = this.tail.next = new c(e, t, i);
this.len += t;
return this;
};
function d(e, t, i) {
t[i] = 255 & e;
}
function g(e, t) {
this.len = e;
this.next = undefined;
this.val = t;
}
g.prototype = Object.create(c.prototype);
g.prototype.fn = function(e, t, i) {
for (;e > 127; ) {
t[i++] = 127 & e | 128;
e >>>= 7;
}
t[i] = e;
};
h.prototype.uint32 = function(e) {
this.len += (this.tail = this.tail.next = new g((e >>>= 0) < 128 ? 1 : e < 16384 ? 2 : e < 2097152 ? 3 : e < 268435456 ? 4 : 5, e)).len;
return this;
};
h.prototype.int32 = function(e) {
return e < 0 ? this._push(f, 10, a.fromNumber(e)) : this.uint32(e);
};
h.prototype.sint32 = function(e) {
return this.uint32((e << 1 ^ e >> 31) >>> 0);
};
function f(e, t, i) {
for (;e.hi; ) {
t[i++] = 127 & e.lo | 128;
e.lo = (e.lo >>> 7 | e.hi << 25) >>> 0;
e.hi >>>= 7;
}
for (;e.lo > 127; ) {
t[i++] = 127 & e.lo | 128;
e.lo = e.lo >>> 7;
}
t[i++] = e.lo;
}
h.prototype.uint64 = function(e) {
var t = a.from(e);
return this._push(f, t.length(), t);
};
h.prototype.int64 = h.prototype.uint64;
h.prototype.sint64 = function(e) {
var t = a.from(e).zzEncode();
return this._push(f, t.length(), t);
};
h.prototype.bool = function(e) {
return this._push(d, 1, e ? 1 : 0);
};
function p(e, t, i) {
t[i] = 255 & e;
t[i + 1] = e >>> 8 & 255;
t[i + 2] = e >>> 16 & 255;
t[i + 3] = e >>> 24;
}
h.prototype.fixed32 = function(e) {
return this._push(p, 4, e >>> 0);
};
h.prototype.sfixed32 = h.prototype.fixed32;
h.prototype.fixed64 = function(e) {
var t = a.from(e);
return this._push(p, 4, t.lo)._push(p, 4, t.hi);
};
h.prototype.sfixed64 = h.prototype.fixed64;
h.prototype.float = function(e) {
return this._push(o.float.writeFloatLE, 4, e);
};
h.prototype.double = function(e) {
return this._push(o.float.writeDoubleLE, 8, e);
};
var m = o.Array.prototype.set ? function(e, t, i) {
t.set(e, i);
} : function(e, t, i) {
for (var n = 0; n < e.length; ++n) t[i + n] = e[n];
};
h.prototype.bytes = function(e) {
var t = e.length >>> 0;
if (!t) return this._push(d, 1, 0);
if (o.isString(e)) {
var i = h.alloc(t = s.length(e));
s.decode(e, i, 0);
e = i;
}
return this.uint32(t)._push(m, t, e);
};
h.prototype.string = function(e) {
var t = r.length(e);
return t ? this.uint32(t)._push(r.write, t, e) : this._push(d, 1, 0);
};
h.prototype.fork = function() {
this.states = new u(this);
this.head = this.tail = new c(l, 0, 0);
this.len = 0;
return this;
};
h.prototype.reset = function() {
if (this.states) {
this.head = this.states.head;
this.tail = this.states.tail;
this.len = this.states.len;
this.states = this.states.next;
} else {
this.head = this.tail = new c(l, 0, 0);
this.len = 0;
}
return this;
};
h.prototype.ldelim = function() {
var e = this.head, t = this.tail, i = this.len;
this.reset().uint32(i);
if (i) {
this.tail.next = e.next;
this.tail = t;
this.len += i;
}
return this;
};
h.prototype.finish = function() {
for (var e = this.head.next, t = this.constructor.alloc(this.len), i = 0; e; ) {
e.fn(e.val, t, i);
i += e.len;
e = e.next;
}
return t;
};
h._configure = function(e) {
n = e;
};
}, {
39: 39
} ],
43: [ function(e, t, i) {
t.exports = s;
var n = e(42);
(s.prototype = Object.create(n.prototype)).constructor = s;
var o = e(39), a = o.Buffer;
function s() {
n.call(this);
}
s.alloc = function(e) {
return (s.alloc = o._Buffer_allocUnsafe)(e);
};
var r = a && a.prototype instanceof Uint8Array && "set" === a.prototype.set.name ? function(e, t, i) {
t.set(e, i);
} : function(e, t, i) {
if (e.copy) e.copy(t, i, 0, e.length); else for (var n = 0; n < e.length; ) t[i++] = e[n++];
};
s.prototype.bytes = function(e) {
o.isString(e) && (e = o._Buffer_from(e, "base64"));
var t = e.length >>> 0;
this.uint32(t);
t && this._push(r, t, e);
return this;
};
function c(e, t, i) {
e.length < 40 ? o.utf8.write(e, t, i) : t.utf8Write(e, i);
}
s.prototype.string = function(e) {
var t = a.byteLength(e);
this.uint32(t);
t && this._push(c, t, e);
return this;
};
}, {
39: 39,
42: 42
} ]
}, {}, [ 19 ]);
})("object" === ("undefined" == typeof window ? "undefined" : _typeof(window)) && window || "object" === ("undefined" == typeof self ? "undefined" : _typeof(self)) && self || void 0);
cc._RF.pop();
}, {
1: void 0,
10: void 0,
11: void 0,
12: void 0,
13: void 0,
14: void 0,
15: void 0,
16: void 0,
17: void 0,
18: void 0,
2: void 0,
20: void 0,
21: void 0,
22: void 0,
23: void 0,
24: void 0,
25: void 0,
26: void 0,
27: void 0,
28: void 0,
29: void 0,
3: void 0,
30: void 0,
31: void 0,
32: void 0,
33: void 0,
34: void 0,
35: void 0,
36: void 0,
37: void 0,
38: void 0,
39: void 0,
4: void 0,
40: void 0,
41: void 0,
42: void 0,
43: void 0,
5: void 0,
6: void 0,
7: void 0,
8: void 0,
9: void 0
} ],
runtime: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "e4eabIYk3ZLuaxpUv2ol3Z3", "runtime");
var n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
return typeof e;
} : function(e) {
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
};
(function(e) {
var t, i = Object.prototype, o = i.hasOwnProperty, a = "function" == typeof Symbol ? Symbol : {}, s = a.iterator || "@@iterator", r = a.asyncIterator || "@@asyncIterator", c = a.toStringTag || "@@toStringTag";
function l(e, t, i, n) {
var o = t && t.prototype instanceof m ? t : m, a = Object.create(o.prototype), s = new R(n || []);
a._invoke = C(e, i, s);
return a;
}
e.wrap = l;
function u(e, t, i) {
try {
return {
type: "normal",
arg: e.call(t, i)
};
} catch (e) {
return {
type: "throw",
arg: e
};
}
}
var h = "suspendedStart", d = "suspendedYield", g = "executing", f = "completed", p = {};
function m() {}
function _() {}
function v() {}
var y = {};
y[s] = function() {
return this;
};
var D = Object.getPrototypeOf, b = D && D(D(F([])));
b && b !== i && o.call(b, s) && (y = b);
var w = v.prototype = m.prototype = Object.create(y);
_.prototype = w.constructor = v;
v.constructor = _;
v[c] = _.displayName = "GeneratorFunction";
function I(e) {
[ "next", "throw", "return" ].forEach(function(t) {
e[t] = function(e) {
return this._invoke(t, e);
};
});
}
e.isGeneratorFunction = function(e) {
var t = "function" == typeof e && e.constructor;
return !!t && (t === _ || "GeneratorFunction" === (t.displayName || t.name));
};
e.mark = function(e) {
if (Object.setPrototypeOf) Object.setPrototypeOf(e, v); else {
e.__proto__ = v;
c in e || (e[c] = "GeneratorFunction");
}
e.prototype = Object.create(w);
return e;
};
e.awrap = function(e) {
return {
__await: e
};
};
function T(e) {
function t(i, a, s, r) {
var c = u(e[i], e, a);
if ("throw" !== c.type) {
var l = c.arg, h = l.value;
return h && "object" === ("undefined" == typeof h ? "undefined" : n(h)) && o.call(h, "__await") ? Promise.resolve(h.__await).then(function(e) {
t("next", e, s, r);
}, function(e) {
t("throw", e, s, r);
}) : Promise.resolve(h).then(function(e) {
l.value = e;
s(l);
}, function(e) {
return t("throw", e, s, r);
});
}
r(c.arg);
}
var i;
this._invoke = function(e, n) {
function o() {
return new Promise(function(i, o) {
t(e, n, i, o);
});
}
return i = i ? i.then(o, o) : o();
};
}
I(T.prototype);
T.prototype[r] = function() {
return this;
};
e.AsyncIterator = T;
e.async = function(t, i, n, o) {
var a = new T(l(t, i, n, o));
return e.isGeneratorFunction(i) ? a : a.next().then(function(e) {
return e.done ? e.value : a.next();
});
};
function C(e, t, i) {
var n = h;
return function(o, a) {
if (n === g) throw new Error("Generator is already running");
if (n === f) {
if ("throw" === o) throw a;
return O();
}
i.method = o;
i.arg = a;
for (;;) {
var s = i.delegate;
if (s) {
var r = M(s, i);
if (r) {
if (r === p) continue;
return r;
}
}
if ("next" === i.method) i.sent = i._sent = i.arg; else if ("throw" === i.method) {
if (n === h) {
n = f;
throw i.arg;
}
i.dispatchException(i.arg);
} else "return" === i.method && i.abrupt("return", i.arg);
n = g;
var c = u(e, t, i);
if ("normal" === c.type) {
n = i.done ? f : d;
if (c.arg === p) continue;
return {
value: c.arg,
done: i.done
};
}
if ("throw" === c.type) {
n = f;
i.method = "throw";
i.arg = c.arg;
}
}
};
}
function M(e, i) {
var n = e.iterator[i.method];
if (n === t) {
i.delegate = null;
if ("throw" === i.method) {
if (e.iterator.return) {
i.method = "return";
i.arg = t;
M(e, i);
if ("throw" === i.method) return p;
}
i.method = "throw";
i.arg = new TypeError("The iterator does not provide a 'throw' method");
}
return p;
}
var o = u(n, e.iterator, i.arg);
if ("throw" === o.type) {
i.method = "throw";
i.arg = o.arg;
i.delegate = null;
return p;
}
var a = o.arg;
if (!a) {
i.method = "throw";
i.arg = new TypeError("iterator result is not an object");
i.delegate = null;
return p;
}
if (!a.done) return a;
i[e.resultName] = a.value;
i.next = e.nextLoc;
if ("return" !== i.method) {
i.method = "next";
i.arg = t;
}
i.delegate = null;
return p;
}
I(w);
w[c] = "Generator";
w[s] = function() {
return this;
};
w.toString = function() {
return "[object Generator]";
};
function S(e) {
var t = {
tryLoc: e[0]
};
1 in e && (t.catchLoc = e[1]);
if (2 in e) {
t.finallyLoc = e[2];
t.afterLoc = e[3];
}
this.tryEntries.push(t);
}
function L(e) {
var t = e.completion || {};
t.type = "normal";
delete t.arg;
e.completion = t;
}
function R(e) {
this.tryEntries = [ {
tryLoc: "root"
} ];
e.forEach(S, this);
this.reset(!0);
}
e.keys = function(e) {
var t = [];
for (var i in e) t.push(i);
t.reverse();
return function i() {
for (;t.length; ) {
var n = t.pop();
if (n in e) {
i.value = n;
i.done = !1;
return i;
}
}
i.done = !0;
return i;
};
};
function F(e) {
if (e) {
var i = e[s];
if (i) return i.call(e);
if ("function" == typeof e.next) return e;
if (!isNaN(e.length)) {
var n = -1, a = function i() {
for (;++n < e.length; ) if (o.call(e, n)) {
i.value = e[n];
i.done = !1;
return i;
}
i.value = t;
i.done = !0;
return i;
};
return a.next = a;
}
}
return {
next: O
};
}
e.values = F;
function O() {
return {
value: t,
done: !0
};
}
R.prototype = {
constructor: R,
reset: function(e) {
this.prev = 0;
this.next = 0;
this.sent = this._sent = t;
this.done = !1;
this.delegate = null;
this.method = "next";
this.arg = t;
this.tryEntries.forEach(L);
if (!e) for (var i in this) "t" === i.charAt(0) && o.call(this, i) && !isNaN(+i.slice(1)) && (this[i] = t);
},
stop: function() {
this.done = !0;
var e = this.tryEntries[0].completion;
if ("throw" === e.type) throw e.arg;
return this.rval;
},
dispatchException: function(e) {
if (this.done) throw e;
var i = this;
function n(n, o) {
r.type = "throw";
r.arg = e;
i.next = n;
if (o) {
i.method = "next";
i.arg = t;
}
return !!o;
}
for (var a = this.tryEntries.length - 1; a >= 0; --a) {
var s = this.tryEntries[a], r = s.completion;
if ("root" === s.tryLoc) return n("end");
if (s.tryLoc <= this.prev) {
var c = o.call(s, "catchLoc"), l = o.call(s, "finallyLoc");
if (c && l) {
if (this.prev < s.catchLoc) return n(s.catchLoc, !0);
if (this.prev < s.finallyLoc) return n(s.finallyLoc);
} else if (c) {
if (this.prev < s.catchLoc) return n(s.catchLoc, !0);
} else {
if (!l) throw new Error("try statement without catch or finally");
if (this.prev < s.finallyLoc) return n(s.finallyLoc);
}
}
}
},
abrupt: function(e, t) {
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
var n = this.tryEntries[i];
if (n.tryLoc <= this.prev && o.call(n, "finallyLoc") && this.prev < n.finallyLoc) {
var a = n;
break;
}
}
a && ("break" === e || "continue" === e) && a.tryLoc <= t && t <= a.finallyLoc && (a = null);
var s = a ? a.completion : {};
s.type = e;
s.arg = t;
if (a) {
this.method = "next";
this.next = a.finallyLoc;
return p;
}
return this.complete(s);
},
complete: function(e, t) {
if ("throw" === e.type) throw e.arg;
if ("break" === e.type || "continue" === e.type) this.next = e.arg; else if ("return" === e.type) {
this.rval = this.arg = e.arg;
this.method = "return";
this.next = "end";
} else "normal" === e.type && t && (this.next = t);
return p;
},
finish: function(e) {
for (var t = this.tryEntries.length - 1; t >= 0; --t) {
var i = this.tryEntries[t];
if (i.finallyLoc === e) {
this.complete(i.completion, i.afterLoc);
L(i);
return p;
}
}
},
catch: function(e) {
for (var t = this.tryEntries.length - 1; t >= 0; --t) {
var i = this.tryEntries[t];
if (i.tryLoc === e) {
var n = i.completion;
if ("throw" === n.type) {
var o = n.arg;
L(i);
}
return o;
}
}
throw new Error("illegal catch attempt");
},
delegateYield: function(e, i, n) {
this.delegate = {
iterator: F(e),
resultName: i,
nextLoc: n
};
"next" === this.method && (this.arg = t);
return p;
}
};
})("object" === ("undefined" == typeof t ? "undefined" : n(t)) ? t.exports : {});
cc._RF.pop();
}, {} ],
shareData: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "2a069uqfO5Ls6M8/2cJLgNE", "shareData");
var n = e("baseData"), o = cc.Class({
extends: n,
name: "shareData",
properties: {
_lastPlayVideoTime: 0,
_urlPre: void 0
},
toVideo: function(e) {
var t = this, i = Date.now(), n = Math.floor((i - this._lastPlayVideoTime) / 1e3);
console.log("TODO-shareData-toVideo()n=" + n + " gCloundMgr.cVideoCD=" + gCloundMgr.cVideoCD + " gameData.gDayVideoCount=" + gameData.gDayVideoCount + " gCloundMgr.cVideoDailyMax=" + gCloundMgr.cVideoDailyMax);
if (n < gCloundMgr.cVideoCD) {
var o = "不能频繁观看视频，请于" + (gCloundMgr.cVideoCD - n) + "秒后再观看";
gWordMgr.showTip(o);
} else if (gameData.gDayVideoCount >= gCloundMgr.cVideoDailyMax) gWordMgr.showTip("达到每日视频上限，请明天再来"); else {
0;
if (gCloundMgr.cHideHuaWei) {
console.log("看视频返回gCloundMgr.cHideHuaWei");
e({
videoIndex: 1,
videoType: 1
});
this._lastPlayVideoTime = Date.now();
} else {
var a = {
videoIndex: gCloundMgr.currShowVideoIndex,
videoType: shareData.getCurrVideoType()
};
nativeData.showRewardAd(function() {
t._lastPlayVideoTime = Date.now();
setTimeout(function() {
console.log("看视频返回a=" + JSON.stringify(a));
e(a);
}, 200);
}, function() {gWordMgr.showTip("显示奖励广告错误:shareData.toVideo()-nativeData.showRewardAd");});
}
}
},
toFullVideo: function(e) {
0;
if (gCloundMgr.cHideHuaWei) {
console.log("看视频返回");
e && e();
} else if (cc.sys.os == cc.sys.OS_IOS) {
nativeData.showFullScreenAd();
setTimeout(function() {
e && e();
}, 200);
} else nativeData.showFullScreenAd(function() {
console.log("全屏视频返回");
e && e();
});
},
toInterAD: function() {
gCloundMgr.cHideHuaWei || nativeData.loadInteractionAd();
},
init: function() {
this.shareUrlExt = "/bzxgs_hb/share/html/download_share.html?invitation=" + gameData.userID;
this.shareTitle = "打炮就可以拿红包？不信来试试！！";
this.shareDes = "10秒就上手，红包拿到手软";
this.shareText = "打炮就可以拿红包？不信来试试！！！";
},
getShareImage: function(e) {
return "http://bzxgs-hb-dl.yx0599.com/bzxgs_hb/share/image/" + e + ".png";
},
openShare: function() {
var e = this;
this.getShareUrl(function(t) {
nativeData.openShare(t, e.shareTitle, e.shareDes);
});
},
beginRotation2: function(e) {
	gameData.plus("gDayTicket", -1);
	gameData.plus("gDayRollerCount", 10);
	gameData.plus("gAllRollerCount", 10);
	gFunctionMgr.addPlayerExp(G_EXP_FROM.ROLLER, gameData.gDayRollerCount);
},
getShareUrl: function(e) {
var t = this;
if (this._urlPre) {
var i = this._urlPre + this.shareUrlExt;
console.log("分享地址1", this._urlPre, i);
gameData.plus("gDayShareTime", 3);
e(i);
} else webData.msgGetSharePath(function(i) {
t._urlPre = i;
var n = i + t.shareUrlExt;
console.log("分享地址2", i, n);
gameData.plus("gDayShareTime", 3);
e(n);
});
},
toShareWX: function() {
var e = this;
this.getShareUrl(function(t) {
nativeData.toShareWX(t, e.shareTitle, e.shareDes);
});
},
toShareWXCricle: function() {
var e = this;
this.getShareUrl(function(t) {
nativeData.toShareWXCricle(t, e.shareTitle, e.shareDes);
});
},
toShareQQ: function() {
var e = this;
this.getShareUrl(function(t) {
nativeData.toShareQQ(t, e.shareTitle, e.shareDes);
});
},
toShareQQZone: function() {
var e = this;
this.getShareUrl(function(t) {
nativeData.toShareQQZone(t, e.shareTitle, e.shareDes);
});
},
toShareSina: function() {
var e = this;
this.getShareUrl(function(t) {
nativeData.toShareSina(t, e.shareTitle, e.shareDes, e.shareText);
});
},
setCurrVdieoType: function(e) {
this._currVideoType = e;
},
getCurrVideoType: function() {
console.log("[视频]视频类型", this._currVideoType);
return this._currVideoType;
}
});
window.shareData = new o();
cc._RF.pop();
}, {
baseData: "baseData"
} ],
signCsvData: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "e7e65eaRHtMGq8rzDLITbu4", "signCsvData");
var n = e("csvData"), o = cc.Class({
extends: n,
properties: {
_fileName: {
override: !0,
default: "sign"
}
}
});
window.signCsvData = new o();
cc._RF.pop();
}, {
csvData: "csvData"
} ],
stageCsvData: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "2bbf9LuZXJC/4OAY8AiAfZq", "stageCsvData");
var n = e("csvData"), o = [ "a005", "a006", "a007" ], a = cc.Class({
extends: n,
name: "stageCsvData",
properties: {
_fileName: {
override: !0,
default: "stage"
},
_currChapterData: void 0
},
getNextChapterID: function() {
var e = gameData.get("gChapter");
return this.getValueByIDKey(e, "NextID");
},
getLastChapterID: function() {
var e = gameData.get("gChapter");
return this.getValueByIDKey(e, "lastID");
},
getCurrChapterType: function() {
var e = gameData.get("gChapter");
return this.getValueByIDKey(e, "type");
},
getMonsterList: function() {
var e = gameData.get("gChapter"), t = [];
this.getValueByIDKey(e, "monsters").split("+").forEach(function(e) {
for (var i = e.split("-"), n = i[0], o = i[1], a = 1; a <= o; a++) t.push(n);
});
t.sort(function() {
return .5 - Math.random();
});
return t;
},
getMonsterIntv: function() {
var e = gameData.get("gChapter");
return this.getValueByIDKey(e, "monsterstime");
},
getChapterName: function() {
var e = gameData.get("gChapter");
return this.getValueByIDKey(e, "name");
},
getGoldPercent: function() {
var e = gameData.get("gChapter");
return this.getValueByIDKey(e, "goldbox");
},
getDiamondPercent: function() {
var e = gameData.get("gChapter");
return this.getValueByIDKey(e, "diamondbox");
},
getOffLinePercent: function() {
var e = gameData.get("gChapter");
return parseInt(this.getValueByIDKey(e, "idlegold"));
},
getIsBossChapter: function() {
var e = gameData.get("gChapter");
return 1 == this.getValueByIDKey(e, "type");
},
getMapGround: function() {
var e = gameData.get("gChapter"), t = this.getValueByIDKey(e, "mapaddress"), i = util.randomRange(0, 2);
return "tilemap/" + t + "/" + o[i];
}
});
window.stageCsvData = new a();
cc._RF.pop();
}, {
csvData: "csvData"
} ],
supplyTowerCsvData: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "50b7fo+5ZNA7KPycsNsZ8as", "supplyTowerCsvData");
var n = e("csvData"), o = cc.Class({
extends: n,
properties: {
_fileName: {
override: !0,
default: "buy_tower"
}
},
getSupplyNumberByTime: function(e) {
e > 50 && (e = 30);
return parseInt(this.getValueByIDKey(e, "num"));
}
});
window.supplyTowerCsvData = new o();
cc._RF.pop();
}, {
csvData: "csvData"
} ],
taskAchieveCsvData: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "ac24cpBq/BITKgvrVm46CiF", "taskAchieveCsvData");
var n = e("csvData"), o = cc.Class({
extends: n,
properties: {
_fileName: {
override: !0,
default: "task_achieve"
}
},
getTaskIDByTypeLevel: function(e, t) {
var i = this.getAllDatas();
for (var n in i) {
var o = i[n];
if (o.achieve_type == e && o.achieve_level == t) return o;
}
return null;
}
});
window.taskAchieveCsvData = new o();
cc._RF.pop();
}, {
csvData: "csvData"
} ],
taskDailyCsvData: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "639a76gkSpN0LEpg5yqG4Hv", "taskDailyCsvData");
var n = e("csvData"), o = cc.Class({
extends: n,
properties: {
_fileName: {
override: !0,
default: "task_daily"
}
}
});
window.taskDailyCsvData = new o();
cc._RF.pop();
}, {
csvData: "csvData"
} ],
taskDivdendCsvData: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "53ee9OeDxBGaIMlBEq3Sg41", "taskDivdendCsvData");
var n = e("csvData"), o = cc.Class({
extends: n,
properties: {
_fileName: {
override: !0,
default: "task_divdend"
}
}
});
window.taskDivdendCsvData = new o();
cc._RF.pop();
}, {
csvData: "csvData"
} ],
towerCsvData: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "77495hcpyFFP517wwNxTU7N", "towerCsvData");
var n = e("csvData"), o = cc.Class({
extends: n,
name: "towerCsvData",
properties: {
_fileName: {
override: !0,
default: "tower"
},
_endLevel: void 0
},
getAttackRgeByID: function(e) {
return parseInt(this.getValueByIDKey(e, "defense"));
},
getAttackPowByID: function(e) {
return parseInt(this.getValueByIDKey(e, "atk"));
},
getAttackSpdByID: function(e) {
return 1 / this.getValueByIDKey(e, "atkspeed");
},
getAttackSpedSecondByID: function(e) {
return this.getValueByIDKey(e, "atkspeed");
},
getPowerPerSceond: function(e) {
var t = this.getAttackPowByID(e), i = this.getAttackSpedSecondByID(e);
return parseInt(t * i);
},
getAttackNameByID: function(e) {
return this.getValueByIDKey(e, "name");
},
getAttacCritByID: function(e) {
return parseInt(this.getValueByIDKey(e, "crit"));
},
getAttacIconByID: function(e) {
var t = this.getValueByIDKey(e, "icon");
return t ? "image/towerLogo/" + t : "image/towerLogo/1";
},
getMissibleIconByID: function(e) {
return e ? "image/towerLogo2/" + e + "-2" : "image/towerLogo2/8-2";
},
getDragonBonesID: function(e) {
return this.getValueByIDKey(e, "icon");
},
getAttackIfRotaByID: function(e) {
return 1 == this.getValueByIDKey(e, "rotation");
},
getBuildTower: function(e) {
var t = this.getValueByIDKey(e, "free_min"), i = this.getValueByIDKey(e, "free_max");
return util.randomRange(t, i);
},
getLowFreeID: function(e) {
return this.getValueByIDKey(e, "free_min");
},
getSellMoney: function(e) {
return this.getValueByIDKey(e, "sell_reward");
},
getUnlockPower: function(e) {
return parseInt(this.getValueByIDKey(e, "free_tower"));
},
getCDTime: function(e) {
return parseInt(this.getValueByIDKey(e, "cd_time"));
},
getMaxTowerLevel: function() {
if (this._endLevel) return this._endLevel;
var e = this.getIDs();
this._endLevel = e.length;
return this._endLevel;
},
getCombineMoney: function(e) {
return this.getValueByIDKey(e, "hc_reward");
},
getRandomMoney: function(e) {
return this.getValueByIDKey(e, "rand_reward");
},
getTotalPowerByID: function(e, t) {
var i = this.getAttackPowByID(e), n = this.getAttackSpedSecondByID(e), o = parseInt(i * n), a = this.getAttackRgeByID(e), s = this.getAttacCritByID(e);
t && (a = 850);
return a / 100 * o * (1 + s / 100);
}
});
window.towerCsvData = new o();
cc._RF.pop();
}, {
csvData: "csvData"
} ],
uiActiveWithdrawal: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "91fb1woWCRFRpdasy3A1eku", "uiActiveWithdrawal");
cc.Class({
extends: e("uiWindowBase"),
properties: {},
start: function() {
this._activeMoney = gCloundMgr.cWithDrawalMoney;
this.initData();
this.addEvents();
webData.msgSendRecore(G_WINDOW_FROM.WITHDRAWAL);
gameData.set("gOpenWithDrawalWindow", !0);
},
closeSelf: function() {
this.closeToNode(G_NODE.HALL.img_active_withdrawal);
},
initData: function() {
var e = this;
if (1 != this._activeMoney) {
var t = "点击【报名参与活动】，明日登录可直接提现" + this._activeMoney + "元";
this.lbl_desc.setLabel(t);
var i = "明日登录即可直接提现" + this._activeMoney + "元";
this.lbl_desc_alway_2.setLabel(i);
var n = this._activeMoney + "元活动已结束";
this.lbl_desc_withdrawal_1.setLabel(n);
}
var o = new Date().getTime();
if (util.dateDifference(gameData.gRegTime, Math.floor(o / 1e3)) + 1 <= 1) {
this._bOpenSerViceReward = !1;
if (gameData.gBActiveWithdrawal) {
this.node_sign.active = !1;
this.node_sign_alway.active = !0;
this.node_withdrawal.active = !1;
} else {
this.node_sign.active = !0;
this.node_sign_alway.active = !1;
this.node_withdrawal.active = !1;
}
var a = new Date();
a.setHours(0);
a.setMinutes(0);
a.setSeconds(0);
var s = Math.floor(a / 1e3) + 86400;
this.lbl_desc_2.setLabel("活动倒计时: " + util.ChangeTimeToSeconds(s - Math.floor(o / 1e3)));
this.lbl_red_num.setLabel(this._activeMoney);
this.schedule(function() {
var t = new Date().getTime();
if (s - Math.floor(t / 1e3) <= 0) {
e.unscheduleAllCallbacks();
e.onShowFiveActionWithDrawal();
} else e.lbl_desc_2.setLabel("活动倒计时: " + util.ChangeTimeToSeconds(s - Math.floor(t / 1e3)));
}, 1);
} else this.onShowFiveActionWithDrawal();
},
addEvents: function() {
var e = this;
this.btn_close.quickBt(function() {
e.closeSelf();
});
this.btn_sign.quickBt(function() {
gWordMgr.showTip("恭喜报名成功!");
gameData.set("gBActiveWithdrawal", !0);
e.node_sign.active = !1;
e.node_sign_alway.active = !0;
});
this.btn_confirm.quickBt(function() {
gWordMgr.showTip("新活动正在准备中...");
e.node_play_desc.stopAllActions();
e.node_play_desc.x = 0;
e.node_play_desc.runAction(cc.repeat(cc.sequence(cc.moveBy(.07, cc.v2(-15, 0)), cc.moveBy(.07, cc.v2(15, 0))), 3));
});
this.btn_sign_alway.quickBt(function() {
gWordMgr.showTip("您已成功报名");
});
this.btn_des.quickBt(function() {
UICtrl.openUI("uiActiveWithdrawal/uiActiveWithdrawalDes");
});
},
onShowFiveActionWithDrawal: function() {
this.node_sign.active = !1;
this.node_sign_alway.active = !1;
this.node_withdrawal.active = !0;
this.lbl_red_num.setLabel("5");
this.lbl_desc_2.setLabel("活动已结束");
},
onDestroy: function() {
gameData.send("moduleTipUpdate", G_WINDOW_FROM.WITHDRAWAL);
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiAdDemo: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "fcadcTe+pBOpbETcPvhbgYI", "uiAdDemo");
cc.Class({
extends: e("baseNode"),
properties: {},
start: function() {
LWADSDK.setRewardID(lwAdConfig.reward_id);
LWADSDK.setBannerID(lwAdConfig.banner_id);
LWADSDK.setFeedID(lwAdConfig.feed_id);
LWADSDK.setSplashID(lwAdConfig.splash_id);
LWADSDK.setInteractionID(lwAdConfig.inter_id);
this.btn_loadVideo.onClick(function() {
LWADSDK.loadRewardAd();
});
this.btn_showVideo.onClick(function() {
LWADSDK.showRewardAd(function() {
console.log("视频播放成功");
gWordMgr.showTip("视频播放成功");
}, function(e) {
console.log("视频播放失败");
gWordMgr.showTip("视频播放失败");
console.log(e);
});
});
this.btn_showBanner.onClick(function() {
LWADSDK.showBanner();
});
this.btn_hideBanner.onClick(function() {
LWADSDK.hideBanner();
});
this.btn_showFeed.onClick(function() {
LWADSDK.showFeed();
});
this.btn_hideFeed.onClick(function() {
LWADSDK.hideFeed();
});
this.btn_showInter.onClick(function() {
LWADSDK.loadInteractionAd();
});
this.btn_showSplash.onClick(function() {
LWADSDK.loadSplashAd();
});
}
});
cc._RF.pop();
}, {
baseNode: "baseNode"
} ],
uiBanner: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "39464faO49DTpT91nmNJj6Y", "uiBanner");
cc.Class({
extends: e("uiBaseLwAd"),
properties: {},
onInit: function() {}
});
cc._RF.pop();
}, {
uiBaseLwAd: "uiBaseLwAd"
} ],
uiBaseLwAd: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "a7e7fqC9INBqYLRddJ6qPrc", "uiBaseLwAd");
var n = e("../../../../frameScript/base/utils/util");
cc.Class({
extends: ui.baseDlg,
properties: {
_bIsDownloading: !1,
_adData: null,
playScale: {
override: !0,
default: !1
},
hasMask: {
override: !0,
default: !1
}
},
start: function() {
this._initBaseEvent();
this.onInit && this.onInit();
this.initUI();
},
_initBaseEvent: function() {
var e = this;
cc.isValid(this.btn_download) && this.btn_download.onClick(function() {
e.downloadGame();
});
cc.isValid(this.btn_downloading) && this.btn_downloading.onClick(function() {
e.downloadGame();
});
cc.isValid(this.btn_close) && this.btn_close.onClick(function() {
e.closeFrame();
});
},
setAdData: function(e) {
this._adData = e;
},
initUI: function() {
var e = this._adData.get("app_name"), t = this._adData.get("app_icon"), i = this._adData.get("app_title");
n.loadUrlImg(this.img_icon, t);
this.lbl_name.setLabel(e);
this.lbl_title.setLabel(i);
this.initImg();
},
initImg: function() {
if (!this._adData.bIsVideoAd()) {
var e = this._adData.get("material_url");
if (e.indexOf(".mp4") > 0) {
LWADSDK.log("图片素材错误 " + e);
return;
}
cc.isValid(this.sp_ad) ? n.loadUrlImg(this.sp_ad, e) : LWADSDK.log("图片展示位置未找到");
}
},
downloadGame: function() {
var e = this;
0;
this.btn_download.active = !1;
this.btn_downloading.active = !0;
var t = this._adData.get("app_packname");
if (t && nativeData.checkAppInstalled(t)) {
LWADSDK.log("已经安装,直接打开 ");
nativeData.startApp(t);
} else {
var i = this._adData.get("click_url");
if (i) if (this._bIsDownloading) LWADSDK.tip("正在下载"); else {
this._bIsDownloading = !0;
LWADSDK.log("开始下载 " + i);
this._adData.sendMarkClick();
LWADSDK.tip("开始下载...");
nativeData.InstallAPP(i, null, function() {
e._bIsDownloading = !1;
}, function() {
e._bIsDownloading = !1;
});
} else LWADSDK.log("下载地址错误 ");
}
},
closeFrame: function() {
LWADSDK.closeUI(this);
}
});
cc._RF.pop();
}, {
"../../../../frameScript/base/utils/util": "util"
} ],
uiBossWarn: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "b474c4q4uJCLI3mfqvgv1IE", "uiBossWarn");
cc.Class({
extends: ui.baseLayer,
properties: {
bossSpr: cc.Node
},
init: function(e) {
var t = this;
this.scheduleOnce(function() {
t.node.destroy();
}, 1);
}
});
cc._RF.pop();
}, {} ],
uiBulletBase: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "5a6afCBXN9HYrn39rjArC8p", "uiBulletBase");
cc.Class({
extends: cc.Component,
properties: {
_bSpeed: 1e3,
_bPowerInfo: void 0,
_bTarget: void 0,
_bInitPos: void 0,
_bID: 1,
_bStrEffect: void 0,
_bMidEffect: void 0,
_bEndEffect: void 0,
_bEffOffset: 0
},
start: function() {},
initWithTarget: function(e, t, i, n, o) {
this.node.position = t;
this._bInitPos = t;
this._bTarget = i;
this._bPowerInfo = n;
this._bID = o;
this._bStrEffect = e.effStart;
this._bMidEffect = e.effMid;
this._bEndEffect = e.effEnd;
this._bEffOffset = e.effOffset;
this._bSpeed = e.effSpeed;
},
playStartEffect: function() {
"NONE" != this._bStrEffect && this.playEffect("bullet/" + this._bStrEffect, this.node.parent, this.node.position);
},
playStartEffectWithFace: function() {
if ("NONE" != this._bStrEffect) {
var e = this.getGunBeginPosFar(), t = this.getTargetVec();
this.playEffect("bullet/" + this._bStrEffect, this.node.parent, e, !1, null, null, t);
}
},
playEndEffect: function() {
if ("NONE" != this._bEndEffect) {
var e = this._bTarget.uiMonster._mGID;
if (gBulletMgr.ifCanPlayEndEffect(e) && cc.isValid(this._bTarget)) {
var t = this._bTarget.position.clone();
this.playEffect("bullet/" + this._bEndEffect, this.node.parent, t);
}
}
},
ritchTarget: function() {
if (cc.isValid(this._bTarget)) {
this._bTarget.uiMonster.beHurt(this._bPowerInfo);
this.playEndEffect();
this.node.destroy();
} else this.node.destroy();
},
ritchTargetButNotDestroy: function() {
if (cc.isValid(this._bTarget)) {
this._bTarget.uiMonster.beHurt(this._bPowerInfo);
this.playEndEffect();
}
},
playEffect: function(e, t, i, n, o, a, s) {
var r = this;
null != e && "" != e && cc.loader.loadRes(e, cc.Prefab, function(e, c) {
if (e) cc.error(e.message || e); else if (cc.isValid(t)) {
var l = cc.instantiate(c);
l.parent = t;
a && (l.scaleX = a);
i && l.setPosition(i);
s && r.changeFace(l, s);
l.getComponent(cc.Animation).on("stop", function(e, t) {
if (!n) {
o && o();
l.destroy();
}
}, t);
}
});
},
changeFace: function(e, t) {
var i = cc.v2(1, 0), n = cc.v2(t).signAngle(i), o = cc.misc.radiansToDegrees(n);
e.angle = -o;
},
getTargetVec: function() {
if (cc.isValid(this._bTarget)) {
var e = this._bTarget.position, t = this.node.position;
return e.sub(t);
}
},
getGunBeginPosFar: function() {
if (cc.isValid(this._bTarget)) {
var e = this._bTarget.position, t = this.node.position, i = e.sub(t).normalize().mul(this._bEffOffset);
return this.node.position.add(i).clone();
}
}
});
cc._RF.pop();
}, {} ],
uiBulletLaser: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "56f77LP+d1MX6etNPXtXTH3", "uiBulletLaser");
var n = e("uiBulletBase");
cc.Class({
extends: n,
properties: {},
initWithTarget: function(e, t, i, o, a) {
n.prototype.initWithTarget.call(this, e, t, i, o, a);
this.playStartEffectWithFace();
var s = this.getTargetVec();
if (s) {
this.changeFace(this.node, s);
this.createEffect(this._bMidEffect);
this.ritchTargetButNotDestroy();
} else this.node.destroy();
},
createEffect: function(e) {
var t = this;
if (cc.isValid(this._bTarget)) {
var i = this._bTarget.position, n = this.node.position, o = i.sub(n).mag(), a = o / 2, s = o / 200, r = cc.v2(a + 50, 0);
this.playEffect("bullet/" + e, this.node, r, !1, function() {
t.node.destroy();
}, s);
} else this.node.destroy();
}
});
cc._RF.pop();
}, {
uiBulletBase: "uiBulletBase"
} ],
uiBulletLight: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "a65b2zcElpPLLiyIaXifDEt", "uiBulletLight");
var n = e("uiBulletBase");
cc.Class({
extends: n,
properties: {},
initWithTarget: function(e, t, i, o, a) {
n.prototype.initWithTarget.call(this, e, t, i, o, a);
this.playStartEffect();
var s = this.getTargetVec();
if (s) {
this.changeFace(this.node, s);
this.createEffect(this._bMidEffect);
this.ritchTargetButNotDestroy();
} else this.node.destroy();
},
createEffect: function(e) {
var t = this;
if (cc.isValid(this._bTarget)) {
var i = this._bTarget.position, n = this.node.position, o = i.sub(n).mag(), a = o / 2, s = o / 200, r = cc.v2(a, 0);
this.playEffect("bullet/" + e, this.node, r, !1, function() {
t.node.destroy();
}, s);
} else this.node.destroy();
}
});
cc._RF.pop();
}, {
uiBulletBase: "uiBulletBase"
} ],
uiBulletMissile: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "ade8aKaSlxAE7Zx7pB78rDC", "uiBulletMissile");
var n = e("uiBulletBase");
cc.Class({
extends: n,
properties: {
_timePlus: 0,
missible: cc.Node
},
initWithTarget: function(e, t, i, o, a) {
n.prototype.initWithTarget.call(this, e, t, i, o, a);
this.playStartEffectWithFace();
this.createMissile();
this.playEffect("bullet/" + this._bMidEffect, this.node, cc.v2(-80, 0));
},
createMissile: function() {
var e = towerCsvData.getMissibleIconByID(this._bID);
util.display(this.missible, e);
var t = cc.scaleTo(.1, .8), i = cc.scaleTo(.2, 1.3);
this.node.runAction(cc.sequence(t, i));
},
update: function(e) {
this._timePlus += e;
if (cc.isValid(this._bTarget)) {
var t = this._bTarget.position, i = this.node.position, n = t.sub(i);
this.changeFace(this.node, n);
if (!(this._timePlus < .2)) {
var o = n.normalize(), a = this._bSpeed * e, s = o.mul(a), r = i.add(s);
this.node.position = r;
n.mag() < G_COM.MONSTER_RADIUS && this.ritchTarget();
}
} else this.node.destroy();
}
});
cc._RF.pop();
}, {
uiBulletBase: "uiBulletBase"
} ],
uiBulletStraight: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "5dacbrL8gVKHYC8ZZTndAHu", "uiBulletStraight");
var n = e("uiBulletBase");
cc.Class({
extends: n,
properties: {},
initWithTarget: function(e, t, i, o, a) {
n.prototype.initWithTarget.call(this, e, t, i, o, a);
this.playStartEffectWithFace();
var s = this.getGunBeginPosFar();
if (s) {
this.node.position = s;
this.playEffect("bullet/" + this._bMidEffect, this.node, cc.v2(0, 0));
} else this.node.destroy();
},
update: function(e) {
if (cc.isValid(this._bTarget)) {
var t = this._bTarget.position, i = this.node.position, n = t.sub(i);
this.changeFace(this.node, n);
var o = n.normalize(), a = this._bSpeed * e, s = o.mul(a), r = i.add(s);
this.node.position = r;
var c = n.mag();
c < a ? this.ritchTarget() : c < G_COM.MONSTER_RADIUS && this.ritchTarget();
} else this.node.destroy();
}
});
cc._RF.pop();
}, {
uiBulletBase: "uiBulletBase"
} ],
uiCombineEffect: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "d708cnoobJCCZ4TbC62dQaw", "uiCombineEffect");
cc.Class({
extends: ui.baseLayer,
properties: {},
start: function() {},
initEffect: function(e) {
var t = this;
if (e + 1 > gameData.get("gMaxTower")) {
audioData.playSoundByID(4, !0);
this.node.destroy();
}
this._tBones = towerCsvData.getDragonBonesID(e);
var i = "tower/pao" + this._tBones + "/pao" + this._tBones + "_ske", n = "tower/pao" + this._tBones + "/pao" + this._tBones + "_tex", o = this.node_tower_1.getComponent(dragonBones.ArmatureDisplay), a = this.node_tower_2.getComponent(dragonBones.ArmatureDisplay);
o.dragonAsset = cc.loader.getRes(i, dragonBones.DragonBonesAsset);
o.dragonAtlasAsset = cc.loader.getRes(n, dragonBones.DragonBonesAtlasAsset);
o.armatureName = "armatureName";
a.dragonAsset = cc.loader.getRes(i, dragonBones.DragonBonesAsset);
a.dragonAtlasAsset = cc.loader.getRes(n, dragonBones.DragonBonesAtlasAsset);
a.armatureName = "armatureName";
var s = cc.delayTime(.05), r = cc.moveTo(.1, cc.v2(0, 0)), c = cc.moveTo(.1, cc.v2(0, 0)), l = cc.removeSelf();
this.node_tower_1.runAction(cc.sequence(s, r, l));
this.node_tower_2.runAction(cc.sequence(s, c, l));
gWordMgr.showArtEffect("effect/hebing", this.node_effect);
this.scheduleOnce(function() {
audioData.playSoundByID(5, !0);
}, .2);
this.scheduleOnce(function() {
t.node.destroy();
}, .8);
}
});
cc._RF.pop();
}, {} ],
uiCombineFail: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "b3e95+9TPdPyoxN1KeM6z8O", "uiCombineFail");
cc.Class({
extends: e("uiWindowBase"),
properties: {},
start: function() {
this.showVideoTip();
},
showVideoTip: function() {
gVideoTipMgr.getIsShowVideoTipCombineFail() && (this.lbl_video_tip.active = !0);
},
initData: function() {
var e = this, t = 100 * configCsvData.cMaxCombineBegin, i = 100 * configCsvData.cMaxCombineEnd, n = util.randomRange(configCsvData.cMaxCombineAdd[0], configCsvData.cMaxCombineAdd[1]);
(!gameData.gMaxCombineSucs || gameData.gMaxCombineSucs < t) && (gameData.gMaxCombineSucs = t);
gameData.plus("gMaxCombineSucs", n);
this.lbl_add.getComponent(cc.Label).string = gameData.gMaxCombineSucs / 100 + "%+" + n / 100 + "%";
if (gameData.gMaxCombineSucs > i) {
gameData.set("gMaxCombineSucs", i);
this.lbl_add.getComponent(cc.Label).string = gameData.gMaxCombineSucs / 100 + "%";
}
var o = gameData.gMaxCombineSucs / 1e4;
this.lbl_process.getComponent(cc.Sprite).fillRange = o;
this.btn_get.quickBt(function() {
var t = configCsvData.cMaxCombineMoney;
UICtrl.openUI("uiCommon/uiCommonMoney", function(e) {
e.initNormal(G_MONEY_FROM.FAIL, t);
});
UICtrl.closeUI(e);
});
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiCommonMoneyGet: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "94552W165BLMrUeS6lp6Wzg", "uiCommonMoneyGet");
cc.Class({
extends: e("uiWindowBase"),
properties: {},
start: function() {
this.toShowInsertVideo();
},
initScript: function(e) {
var t = this;
this.lbl_tip_1.getComponent(cc.Label).string = "恭喜获得红包币";
this.img_logo_type_1.active = !0;
this.lbl_type_1.getComponent(cc.Label).string = e;
this.btn_ok.quickBt(function() {
gWealthMgr.updateMoney(e, t.btn_ok, G_MONEY_FLOW.TOWER);
UICtrl.closeUI(t);
});
this.btn_close.quickBt(function() {
gWealthMgr.updateMoney(e, t.btn_close, G_MONEY_FLOW.TOWER);
UICtrl.closeUI(t);
});
},
initTurntableMoney: function(e) {
var t = this;
this.lbl_tip_1.getComponent(cc.Label).string = "恭喜获得现金";
this.img_logo_type_2.active = !0;
this.lbl_type_2.getComponent(cc.Label).string = e / 1e4;
this.btn_ok.quickBt(function() {
gWealthMgr.flyMoneyToTurntable(t.btn_ok);
UICtrl.closeUI(t);
});
this.btn_close.quickBt(function() {
gWealthMgr.flyMoneyToTurntable(t.btn_close);
UICtrl.closeUI(t);
});
},
onDestroy: function() {
gVideoTipMgr.getIsShowVideoTipMoney() && UICtrl.openUI("uiVideoTip/uiVideoTipAfterVideo");
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiCommonMoney: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "885ffjN/wNDpYTLbdM/3Bn8", "uiCommonMoney");
cc.Class({
extends: e("uiWindowBase"),
properties: {},
start: function() {
var e = this;
if (this.btn_close.active) {
console.log("TODO-uiCommonMoney-start()btn_close");
this.btn_close.opacity = 255;
//this.scheduleOnce(function() {
//e.btn_close.opacity = 255;
//}, 1.5);
}
if (this.btn_sure.active) {
console.log("TODO-uiCommonMoney-start()btn_sure");
this.btn_sure.opacity = 255;
//this.scheduleOnce(function() {
//e.btn_sure.opacity = 255;
//}, 1.5);
}
audioData.playSoundByID(7, !0);
},
initVideoExt: function(e, t, i, n, o) {
var a = this;
this.setWindowTitle(e);
this.btn_video.active = !0;
this.btn_sure.active = !0;
this.lbl_money.getComponent(cc.Label).string = i;
var s = parseInt(i) + parseInt(n);
this.lbl_extra.getComponent(cc.Label).string = "领取" + s + "红包币";
this.btn_video.quickBt(function() {
shareData.toVideo(function(i) {
webData.msgSaveMoney(e, s, function() {
UICtrl.openUI("uiCommon/uiCommonMoneyGet", function(e) {
e.initScript(s);
});
o && o(!0);
UICtrl.closeUI(a);
});
webData.msgSaveVideo(t, function() {}, i);
});
}, !0);
this.btn_sure.quickBt(function() {
webData.msgSaveMoney(e, i, function() {
UICtrl.openUI("uiCommon/uiCommonMoneyGet", function(e) {
e.initScript(i);
});
o && o(!0);
UICtrl.closeUI(a);
});
});
},
initNormal: function(e, t, i) {
var n = this;
t *= 100;
console.log("TODO-uiCommonMoney-initNormal()红包币*100=" + t);
this.setWindowTitle(e);
this.btn_direct.active = !0;
this.lbl_money.getComponent(cc.Label).string = t;
this.btn_direct.quickBt(function() {
webData.msgSaveMoney(e, t, function() {
UICtrl.openUI("uiCommon/uiCommonMoneyGet", function(e) {
e.initScript(t);
});
console.log("TODO-uiCommonMoney-initNormal()btn_direct");
i && i(!0);
UICtrl.closeUI(n);
});
});
this.toShowInsertVideo();
},
initNormalClose: function(e, t, i) {
var n = this;
this.initNormal(e, t, i);
this.btn_close.active = !0;
this.btn_close.quickBt(function() {
console.log("TODO-uiCommonMoney-initNormalClose()btn_close");
i && i(!1);
UICtrl.closeUI(n);
});
},
initVideo: function(e, t, i, n) {
var o = this;
this.setWindowTitle(e);
this.btn_video.active = !0;
this.btn_close.active = !0;
this.lbl_money.getComponent(cc.Label).string = i;
this.lbl_extra.getComponent(cc.Label).string = "领取";
this.btn_video.setContentSize(300, 99);
this.img_video.x = -81;
this.lbl_extra.x = 24;
this.btn_video.quickBt(function() {
shareData.toVideo(function(a) {
webData.msgSaveMoney(e, i, function() {
UICtrl.openUI("uiCommon/uiCommonMoneyGet", function(e) {
e.initScript(i);
});
n && n(!0);
UICtrl.closeUI(o);
});
webData.msgSaveVideo(t, function() {}, a);
});
}, !0);
this.btn_close.quickBt(function() {
n && n(!1);
UICtrl.closeUI(o);
});
},
setWindowTitle: function(e) {
var t = "image/moneyTitle/money_from_" + e;
util.display(this.img_money_type, t);
},
initQQBoxMoney: function(e, t, i, n) {
var o = this;
this.setWindowTitle(e);
this.btn_video.active = !0;
this.btn_sure.active = !0;
this.img_video.active = !1;
this.img_video_2.active = !0;
this.lbl_money.getComponent(cc.Label).string = t;
var a = parseInt(t) + parseInt(i);
this.lbl_extra.getComponent(cc.Label).string = "领取" + a + "红包币";
this.btn_video.quickBt(function() {
shareData.toFullVideo(function() {
webData.msgSaveMoney(e, a, function() {
gameData.plus("gDayOpenGameBoxVideo", 1);
webData.msgSendRecore(G_WINDOW_FROM.MONEY_BOX_VIDEO);
UICtrl.openUI("uiCommon/uiCommonMoneyGet", function(e) {
e.initScript(a);
});
n && n(!0);
UICtrl.closeUI(o);
});
});
}, !0);
this.btn_sure.quickBt(function() {
webData.msgSaveMoney(e, t, function() {
UICtrl.openUI("uiCommon/uiCommonMoneyGet", function(e) {
e.initScript(t);
});
n && n(!0);
UICtrl.closeUI(o);
});
});
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiCommonSupply: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "45e77qL0+xFTriOSsM1mP27", "uiCommonSupply");
cc.Class({
extends: e("uiWindowBase"),
properties: {},
__preload: function() {
if (cc.sys.os == cc.sys.OS_IOS) {
if (util.randomRange(1, 10) <= 5) {
this.showFeed = !1;
this.showBanner = !0;
}
}
},
start: function() {
var e = cc.rotateBy(1e3, 36e3);
this.img_light.runAction(e);
},
initSupply: function(e) {
var t = this, i = parseInt(gameData.gDaySupplyCount) + 1, n = supplyTowerCsvData.getSupplyNumberByTime(i);
console.log("[炮塔补给次数和数量]", n, gameData.gDaySupplyCount);
this.lbl_supply.getComponent(cc.Label).string = "+" + n;
this.btn_video.quickBt(function() {
shareData.toVideo(function(i) {
webData.msgSaveVideo(G_VIDEO_FROM.SUPPLY, function() {
gameData.plus("gDaySupplyCount", 1);
e && e(n);
gWealthMgr.flyTowerFromNode(t.btn_video, n);
UICtrl.closeUI(t);
}, i);
});
}, !0);
this.btn_close.quickBt(function() {
UICtrl.closeUI(t);
});
this.btn_close.opacity = 0;
this.scheduleOnce(function() {
t.btn_close.opacity = 255;
}, 1.5);
},
initNormal: function(e, t) {
var i = this;
this.img_title_video.active = !1;
this.img_title_sure.active = !0;
this.btn_sure.active = !0;
this.btn_video.active = !1;
this.btn_close.active = !1;
this.lbl_supply.getComponent(cc.Label).string = "+" + e;
this.btn_sure.quickBt(function() {
t && t();
gameData.plus("gQuickPower", e);
gameData.plus("gPowerRoller", e);
gWealthMgr.flyTowerFromNode(i.btn_sure, e);
UICtrl.closeUI(i);
});
this.toShowInsertVideo();
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiCommonTip: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "28d7fO9+fRJfL5Ah5XkTlEO", "uiCommonTip");
cc.Class({
extends: e("uiWindowBase"),
properties: {},
start: function() {
this.toShowInsertVideo();
},
initScript: function(e) {
var t = this;
this.btn_close.quickBt(function() {
UICtrl.closeUI(t);
});
this.btn_sure.quickBt(function() {
UICtrl.closeUI(t);
});
this.lbl_tip.getComponent(cc.Label).string = e;
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiDividend: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "2a190ACychF1Zo9QVq5gDhy", "uiDividend");
cc.Class({
extends: e("uiWindowBase"),
properties: {
itemPrefab: cc.Prefab
},
start: function() {
this.addEvents();
this.initDatas();
webData.msgSendRecore(G_WINDOW_FROM.DIVIDEND);
},
initDatas: function() {
var e = this;
pageData.msgGetDailyShare(function(t) {
e.updateUI(t);
});
},
updateUI: function(e) {
this.lbl_income_player.getComponent(cc.Label).string = e.yesterdayfh / 100;
this.lbl_income_gun.getComponent(cc.Label).string = e.onesy / 100;
this.lbl_amount_total.getComponent(cc.Label).string = e.divpigcount;
this.lbl_amount_today.getComponent(cc.Label).string = e.daypigcount;
for (var t in e.pigLog) {
var i = e.pigLog[t], n = cc.instantiate(this.itemPrefab);
n.parent = this.layout_record;
n.lbl_record_name.getComponent(cc.Label).string = i.weiXinName;
n.lbl_record_way.getComponent(cc.Label).string = "成功获得分红炮";
n.lbl_record_time.getComponent(cc.Label).string = i.optime;
}
},
addEvents: function() {
var e = this;
this.btn_close.quickBt(function() {
UICtrl.closeUI(e);
});
this.btn_tixian.quickBt(function() {
gWordMgr.showTip("获得炮王后每日可领取分红");
});
this.node_click_1.quickBt(function() {
UICtrl.openUI("uiWindows/uiWindowDividendInfo");
});
this.node_click_2.quickBt(function() {
UICtrl.openUI("uiWindows/uiWindowDividendInfo");
});
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiFallBox: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "993be3HH15Bra0Xe73bl38L", "uiFallBox");
cc.Class({
extends: cc.Component,
properties: {},
start: function() {
this.initAction();
this.initEvent();
},
initEvent: function() {
this.node.quickBt(function() {});
},
initAction: function() {
this.node.y = G_COM.G_HEIGHT;
var e = cc.moveBy(30, cc.v2(0, -G_COM.G_HEIGHT)), t = cc.callFunc(function() {
gMainMgr.initFallBox(10);
}), i = cc.removeSelf();
this.node.runAction(cc.sequence(e, t, i));
var n = cc.rotateTo(2, 30), o = cc.rotateTo(2, -30);
n.easing(cc.easeSineIn());
o.easing(cc.easeSineIn());
var a = cc.repeatForever(cc.sequence(n, o));
this.node.runAction(a);
}
});
cc._RF.pop();
}, {} ],
uiFeed: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "b2394oRljpOwpfZPMTXQJlO", "uiFeed");
cc.Class({
extends: e("uiBaseLwAd"),
properties: {},
onInit: function() {}
});
cc._RF.pop();
}, {
uiBaseLwAd: "uiBaseLwAd"
} ],
uiFlowMoney: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "99fe7GvMYhNcpHgxSjUwnX/", "uiFlowMoney");
cc.Class({
extends: ui.baseLayer,
properties: {},
initScript: function(e, t) {
this.node.position = cc.v2(-50, -100);
if (t == G_MONEY_FLOW.MONSTER) {
this.lbl_monster_word.active = !0;
this.lbl_monster_word.getComponent(cc.Label).string = "+" + e;
} else {
this.img_banner.active = !0;
this.lbl_tower_word.getComponent(cc.Label).string = "+" + e;
}
var i = cc.delayTime(.5), n = cc.fadeTo(.5, 0), o = cc.sequence(i, n), a = cc.moveTo(1.5, cc.v2(-50, 100)), s = cc.spawn(o, a), r = cc.removeSelf(), c = cc.sequence(s, r);
this.node.runAction(c);
}
});
cc._RF.pop();
}, {} ],
uiFlyBezierTower: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "1c10fId0EdNrbI7r+GHzYiO", "uiFlyBezierTower");
cc.Class({
extends: ui.baseLayer,
properties: {},
start: function() {},
initWithTarget: function(e) {
for (var t = G_NODE.QUICK_TOWER.getCurrBuyTowerID(), i = this.node.getChildren(), n = 0; n <= 9; n++) {
var o = towerCsvData.getAttacIconByID(t);
util.display(i[n], o);
}
this.node.position = e;
var a = cc.v2(0, 0), s = G_POS.P_FREE_GLOBAL.sub(e);
this.flyTypeOne(a, s);
},
flyTypeOne: function(e, t) {
var i = this;
this.scheduleOnce(function() {
i.node.destroy();
}, 3);
var n = this.node.getChildren();
this.toFlyTypeOne(n[0], e, t);
var o = 1;
this.schedule(function() {
var a = n[o];
a.active = !0;
i.toFlyTypeOne(a, e, t);
o++;
}, .05, 8);
},
toFlyTypeOne: function(e, t, i) {
var n = util.randomRange(-60, 60);
n *= 10;
var o = (i.x - t.x) / 3 + t.x, a = (i.y - t.y) / 3 + t.y, s = [ t, cc.v2(o + n, a), i ], r = cc.bezierTo(.5, s), c = cc.callFunc(function() {
e.active = !1;
});
e.runAction(cc.sequence(r, c));
}
});
cc._RF.pop();
}, {} ],
uiFlyCricleMoney: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "5452cUDq1BBvIv8OSZJ/S59", "uiFlyCricleMoney");
cc.Class({
extends: ui.baseLayer,
properties: {},
start: function() {},
initWithTarget: function(e) {
this._targetPos = G_POS.P_MONEY_GLOBAL.sub(e);
this.node.position = e;
this.flyTypeTwo();
},
flyTypeTwo: function() {
for (var e = this.node.getChildren(), t = 0; t < 12; t++) {
var i = e[t];
this.toFlyTypeTwo(t, i);
}
},
toFlyTypeTwo: function(e, t) {
var i = this, n = cc.scaleTo(.2, -1, 1), o = cc.scaleTo(.2, 1, 1), a = cc.sequence(n, o), s = cc.repeatForever(a);
t.runAction(s);
var r = 30 * e * Math.PI / 180, c = 100 * Math.sin(r) + Math.random() / 4 * 30, l = 100 * -Math.cos(r) + Math.random() / 4 * 30, u = cc.moveTo(.2, cc.v2(c, l)).easing(cc.easeCubicActionIn()), h = cc.moveTo(.7 + .5 * Math.random(), this._targetPos.x, this._targetPos.y).easing(cc.easeCubicActionIn()), d = cc.delayTime(.1), g = cc.callFunc(function() {
gWordMgr.playGoldSound(!0);
}), f = cc.removeSelf(), p = cc.sequence(u, h, g, d, f);
t.runAction(p);
this.scheduleOnce(function() {
i.node.destroy();
}, 1.5);
}
});
cc._RF.pop();
}, {} ],
uiFlyLineMoney: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "f04fbpHIYRGL7OE1BMTIjUj", "uiFlyLineMoney");
cc.Class({
extends: ui.baseLayer,
properties: {},
start: function() {},
initWithTarget: function(e) {
this._targetPos = G_POS.P_MONEY_GLOBAL.sub(e);
this.node.position = e;
this.flyTypeTwo();
},
initWithTurntable: function(e) {
this._targetPos = G_POS.P_TURNTABLE.sub(e);
this.node.position = e;
this.flyTypeTwo();
},
initWithFamily: function(e) {
var t = cc.v2(285, G_COM.G_HEIGHT / 2 - 190);
this._targetPos = t.sub(e);
this.node.position = e;
this.flyTypeTwo();
this._inFamilyZone = !0;
},
flyTypeTwo: function() {
for (var e = this.node.getChildren(), t = 0; t < 10; t++) {
var i = e[t];
this.toFlyTypeTwo(t, i);
}
},
toFlyTypeTwo: function(e, t) {
var i = this, n = .1 * e, o = cc.delayTime(n), a = cc.moveTo(.4, this._targetPos).easing(cc.easeCubicActionIn()), s = cc.fadeTo(0, 255), r = cc.delayTime(.1), c = cc.callFunc(function() {
i._inFamilyZone ? audioData.playSoundByID(20, !0, 2) : audioData.playSoundByID(20, !0);
}), l = cc.removeSelf(), u = cc.callFunc(function() {
5 == e && i.node.destroy();
}), h = cc.sequence(o, s, a, c, r, l, u);
t.runAction(h);
}
});
cc._RF.pop();
}, {} ],
uiFlyLineUnionOne: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "685bdHsVidL5rQY5IMLqmAO", "uiFlyLineUnionOne");
cc.Class({
extends: ui.baseLayer,
properties: {},
start: function() {},
initWithTarget: function(e) {
this._targetPos = G_POS.P_FRIEND_GROUP_GLOBAL.sub(e);
this.node.position = e;
this.toFlyTypeTwo(1);
},
toFlyTypeTwo: function(e) {
var t = this, i = .15 * e, n = cc.delayTime(i), o = cc.moveTo(.8, this._targetPos).easing(cc.easeCubicActionIn()), a = cc.fadeTo(0, 255), s = cc.delayTime(.1), r = cc.callFunc(function() {
audioData.playSoundByID(12, !0);
}), c = cc.removeSelf(), l = cc.callFunc(function() {
t.node.destroy();
}), u = cc.sequence(n, a, o, r, s, c, l);
this.node.runAction(u);
}
});
cc._RF.pop();
}, {} ],
uiFlyLineUnion: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "d28cdazxghM05ooZvM1OYAW", "uiFlyLineUnion");
cc.Class({
extends: ui.baseLayer,
properties: {},
start: function() {},
initWithTarget: function(e) {
this._targetPos = G_POS.P_FRIEND_GROUP_GLOBAL.sub(e);
this.node.position = e;
this.flyTypeTwo();
},
flyTypeTwo: function() {
for (var e = this.node.getChildren(), t = 0; t < 10; t++) {
var i = e[t];
this.toFlyTypeTwo(t, i);
}
},
toFlyTypeTwo: function(e, t) {
var i = this, n = .15 * e, o = cc.delayTime(n), a = cc.moveTo(.4, this._targetPos).easing(cc.easeCubicActionIn()), s = cc.fadeTo(0, 255), r = cc.delayTime(.1), c = cc.callFunc(function() {
i._inFamilyZone ? audioData.playSoundByID(12, !0, 2) : audioData.playSoundByID(12, !0);
}), l = cc.removeSelf(), u = cc.callFunc(function() {
5 == e && i.node.destroy();
}), h = cc.sequence(o, s, a, c, r, l, u);
t.runAction(h);
}
});
cc._RF.pop();
}, {} ],
uiFlySingleMoney: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "fb08bDLL0JKZ635ZVdTqJgi", "uiFlySingleMoney");
cc.Class({
extends: ui.baseLayer,
properties: {},
start: function() {},
initWithTarget: function(e) {
this.node.position = e;
var t = e, i = G_POS.P_MONEY;
i ? this.nodeFlyToPos(this.node, t, i) : this.node.destroy();
},
nodeFlyToPos: function(e, t, i) {
var n = util.randomRange(-20, 20);
n *= 10;
var o = (i.x - t.x) / 2 + t.x, a = (i.y - t.y) / 2 + t.y, s = [ t, cc.v2(o + n, a), i ], r = cc.bezierTo(.8, s), c = cc.removeSelf();
e.runAction(cc.sequence(r, c));
}
});
cc._RF.pop();
}, {} ],
uiFramePolicy: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "0a3beUEuzRDxILxc6Lj+RfA", "uiFramePolicy");
cc.Class({
extends: ui.baseDlg,
properties: {},
start: function() {
gameData.set("openPolicyWindow", !0);
gameData.storeValue("openPolicyWindow");
},
initScript: function(e, t) {
var i = this;
this.btn_privacy_policy.quickBt(function() {
UICtrl.openUI("uiFrame/uiFramePrivacypolicy");
});
this.btn_user_agreement.quickBt(function() {
UICtrl.openUI("uiFrame/uiFrameUserAgreement");
});
this.btn_disagree.quickBt(function() {
t && t();
UICtrl.closeUI(i);
});
this.btn_agree.quickBt(function() {
e && e();
UICtrl.closeUI(i);
});
}
});
cc._RF.pop();
}, {} ],
uiFreeLotteryAddress: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "4008dhstONJZ7M7yLtyfWJC", "uiFreeLotteryAddress");
cc.Class({
extends: e("uiWindowBase"),
properties: {},
start: function() {
this.initEvent();
this.initData();
},
initEvent: function() {
var e = this;
this.btn_close.quickBt(function() {
UICtrl.closeUI(e);
});
this.btn_save.quickBt(function() {
e.saveData();
UICtrl.closeUI(e);
});
this.edit_name.on("editing-did-began", this.onEditDidBegan, this);
this.edit_box.on("editing-did-ended", this.onEditDidEnded, this);
},
onEditDidBegan: function(e) {
cc.sys.os == cc.sys.OS_IOS ? this.node_main.y = 300 : this.node_main.y = -300;
},
onEditDidEnded: function() {
this.node_main.y = 0;
},
initData: function() {
gameData.gUserName && "" != gameData.gUserName ? this.edit_name.getComponent(cc.EditBox).string = gameData.gUserName : this.edit_name.getComponent(cc.EditBox).string = "";
gameData.gUserPhone && "" != gameData.gUserPhone ? this.edit_phone.getComponent(cc.EditBox).string = gameData.gUserPhone : this.edit_phone.getComponent(cc.EditBox).string = "";
gameData.gUserAddress && "" != gameData.gUserAddress ? this.edit_address.getComponent(cc.EditBox).string = gameData.gUserAddress : this.edit_address.getComponent(cc.EditBox).string = "";
},
saveData: function() {
var e = this.edit_name.getComponent(cc.EditBox).string, t = this.edit_phone.getComponent(cc.EditBox).string, i = this.edit_address.getComponent(cc.EditBox).string;
console.log("[保存]名字", e);
console.log("[保存]电话", t);
console.log("[保存]地址", i);
e && gameData.set("gUserName", e);
t && gameData.set("gUserPhone", t);
i && gameData.set("gUserAddress", i);
gWordMgr.showTip("已保存");
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiFreeLotteryAward: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "ffacaR4YfdGnrhslwDuZLPc", "uiFreeLotteryAward");
cc.Class({
extends: e("uiWindowBase"),
properties: {},
start: function() {
audioData.playSoundByID(7, !0);
this.showVideoTip();
},
showVideoTip: function() {
gVideoTipMgr.getIsShowVideoTipPhone() && (this.lbl_video_tip.active = !0);
},
initSingleAward: function(e, t) {
var i = this;
this.node_single.active = !0;
this.node_double.active = !1;
var n = e.currID, o = e.currNUM, a = itemCsvData.getItemName(n), s = itemCsvData.getItemMax(n), r = itemCsvData.getItemPices(n);
util.display(this.img_award_logo, r);
gFreeLotteryMgr.addItemPices(n, o);
gFreeLotteryMgr.saveLotteryHistory(n, o);
this.lbl_award_name.getComponent(cc.Label).string = a;
this.lbl_award_num.getComponent(cc.Label).string = o;
this.lbl_process.getComponent(cc.Label).string = gFreeLotteryMgr.getItemPices(n) + "/" + s;
var c = gFreeLotteryMgr.getItemPices(n) / s;
c > 1 && (c = 1);
this.img_process.getComponent(cc.Sprite).fillRange = c;
this.btn_close.quickBt(function() {
t();
UICtrl.closeUI(i);
});
this.btn_video.quickBt(function() {
t();
UICtrl.closeUI(i);
}, !0);
},
initDouleAward: function(e, t, i) {
var n = this;
this.node_single.active = !1;
this.node_double.active = !0;
var o = e.max_num, a = e.id, s = e.goodsid, r = itemCsvData.getItemName(s), c = util.randomRange(1, o), l = itemCsvData.getItemPices(s), u = e.first_num;
pageData.getHasGetLotteryMoney() && 101 == a && (u = e.second_num);
util.display(this.img_award_logo_1, l);
gFreeLotteryMgr.addItemPices(a, c);
this.lbl_award_name_1.getComponent(cc.Label).string = r;
this.lbl_award_num_1.getComponent(cc.Label).string = c;
this.lbl_process_1.getComponent(cc.Label).string = gFreeLotteryMgr.getItemPices(a) + "/" + u;
var h = gFreeLotteryMgr.getItemPices(a) / u;
h > 1 && (h = 1);
this.img_process_1.getComponent(cc.Sprite).fillRange = h;
var d = t.max_num, g = t.id, f = t.goodsid, p = itemCsvData.getItemName(f), m = util.randomRange(1, d), _ = itemCsvData.getItemPices(f), v = t.first_num;
pageData.getHasGetLotteryMoney() && 101 == g && (v = t.second_num);
util.display(this.img_award_logo_2, _);
gFreeLotteryMgr.addItemPices(g, m);
this.lbl_award_name_2.getComponent(cc.Label).string = p;
this.lbl_award_num_2.getComponent(cc.Label).string = m;
this.lbl_process_2.getComponent(cc.Label).string = gFreeLotteryMgr.getItemPices(g) + "/" + v;
var y = gFreeLotteryMgr.getItemPices(g) / v;
y > 1 && (y = 1);
this.img_process_2.getComponent(cc.Sprite).fillRange = y;
this.btn_close.quickBt(function() {
i();
gFreeLotteryMgr.saveLotteryHistory(s, c);
gFreeLotteryMgr.saveLotteryHistory(f, m);
UICtrl.closeUI(n);
});
this.lbl_video_three.active = !1;
this.lbl_video_double.active = !0;
this.btn_video.quickBt(function() {
shareData.toVideo(function(e) {
webData.msgSaveVideo(G_VIDEO_FROM.PHONE_AWARD, function() {
gFreeLotteryMgr.addItemPices(a, c);
gFreeLotteryMgr.addItemPices(g, m);
gFreeLotteryMgr.saveLotteryHistory(s, 2 * c);
gFreeLotteryMgr.saveLotteryHistory(f, 2 * m);
UICtrl.openUI("uiFreeLottery/uiFreeLotteryDouble", function(e) {
e.initDouble(s, f, 2);
});
UICtrl.closeUI(n);
i();
}, e);
});
}, !0);
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiFreeLotteryBanner: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "c303dsDg3tNAattJaRHTyip", "uiFreeLotteryBanner");
cc.Class({
extends: ui.baseLayer,
properties: {},
start: function() {
this.initBanner();
this.playBannerAnim();
},
initBanner: function() {
this.lbl_get_history_1.getComponent(cc.Label).string = this.getRandomStr();
this.lbl_get_history_2.getComponent(cc.Label).string = this.getRandomStr();
this._iChildren = this.node.children;
this._iHeight = 48;
for (var e in this._iChildren) {
this._iChildren[e].x = 0;
this._iChildren[e].y = -e * this._iHeight;
}
this._iHeightLow = this._iChildren[this._iChildren.length - 1].y;
},
playBannerAnim: function() {
var e = this, t = function(t) {
var i = e._iChildren[t];
i.runAction(cc.repeatForever(cc.sequence(cc.delayTime(2), cc.moveBy(.5, 0, e._iHeight), cc.delayTime(.5), cc.callFunc(function() {
if (i.y >= this._iHeight - 1) {
i.y = this._iHeightLow;
i.getComponent(cc.Label).string = this.getRandomStr();
}
}.bind(e)))));
};
for (var i in this._iChildren) t(i);
},
getRandomStr: function() {
var e = NPCNameData.getRandomName(), t = "2";
util.randomRange(1, 10) <= 8 && (t = "0.3");
return "恭喜用户" + e + "获得" + t + "元红包";
}
});
cc._RF.pop();
}, {} ],
uiFreeLotteryDouble: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "39cabxMHbNJPZ3XpoEnTPpD", "uiFreeLotteryDouble");
cc.Class({
extends: e("uiWindowBase"),
properties: {},
start: function() {
audioData.playSoundByID(7, !0);
this.initEvent();
},
initEvent: function() {
var e = this;
this.btn_get.quickBt(function() {
UICtrl.closeUI(e);
});
},
initOne: function(e, t) {
this.img_item_1.active = !0;
this.img_item_1.x = 0;
this.img_item_2.active = !1;
var i = itemCsvData.getItemPices(e);
util.display(this.img_logo_1, i);
this.lbl_double_1.getComponent(cc.Label).string = "x" + t;
},
initDouble: function(e, t, i) {
var n = itemCsvData.getItemPices(e);
util.display(this.img_logo_1, n);
this.lbl_double_1.getComponent(cc.Label).string = "x" + i;
var o = itemCsvData.getItemPices(t);
util.display(this.img_logo_2, o);
this.lbl_double_2.getComponent(cc.Label).string = "x" + i;
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiFreeLotteryRecord: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "006bakd+NJLXZVkky/iH3+J", "uiFreeLotteryRecord");
cc.Class({
extends: e("uiWindowBase"),
properties: {},
start: function() {
this.initEvent();
this.initData();
this.showHideInfo();
},
initEvent: function() {
var e = this;
this.btn_close.quickBt(function() {
UICtrl.closeUI(e);
});
},
initData: function() {
this.node_prefab.active = !1;
for (var e in gameData.gDayLotteryRecord) {
var t = gameData.gDayLotteryRecord[e].split("|"), i = cc.instantiate(this.node_prefab);
i.parent = this.node_scrollContent;
i.active = !0;
var n = util.changeDateFormat(t[0], -3);
i.lbl_time.getComponent(cc.Label).string = n;
i.lbl_number.getComponent(cc.Label).string = t[2];
i.lbl_item.getComponent(cc.Label).string = itemCsvData.getItemName(t[1]);
}
},
showHideInfo: function() {}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiFreeLotteryRule: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "9c803JhlrNBkpBXgF5CQEOF", "uiFreeLotteryRule");
cc.Class({
extends: e("uiWindowBase"),
properties: {},
start: function() {
this.initEvent();
},
initEvent: function() {
var e = this;
this.btn_close.quickBt(function() {
UICtrl.closeUI(e);
});
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiFreeLotterySupply: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "745deY3PJ9LmqyLmX1S9XhP", "uiFreeLotterySupply");
cc.Class({
extends: e("uiWindowBase"),
properties: {},
start: function() {
this.initUI();
},
initUI: function() {
var e = this;
this.btn_close.quickBt(function() {
UICtrl.closeUI(e);
});
this.lbl_get_time.getComponent(cc.Label).string = gFreeLotteryMgr.cFreeLotterySupplyNum;
},
initScript: function(e) {
var t = this;
this.btn_video.quickBt(function() {
shareData.toVideo(function(i) {
webData.msgSaveVideo(G_VIDEO_FROM.PHONE_TICKET, function() {
gameData.plus("gDayLotteryTicket", gFreeLotteryMgr.cFreeLotterySupplyNum);
gameData.plus("gDayLotterySupply", 1);
gameData.gLotteryVideo[2] = gameData.gLotteryVideo[2] + 1;
gameData.save("gLotteryVideo");
e && e();
UICtrl.closeUI(t);
}, i);
});
}, !0);
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiFreeLottery: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "b6742IaALpAL5dyfgASrDZq", "uiFreeLottery");
cc.Class({
extends: ui.baseDlg,
properties: {},
start: function() {
this.initUI();
this.initData();
this.initEvent();
this.initTitle();
this.initLottory();
this.updatePicesAward();
this.updateTicket();
this.updateRoundDay();
webData.msgSendRecore(G_WINDOW_FROM.LOTTERY);
gameData.set("gOpenLottery", !0);
gFreeLotteryMgr.inLotteryPage(!0);
},
onDestroy: function() {
gFreeLotteryMgr.inLotteryPage(!1);
},
initUI: function() {
var e = cc.Canvas.instance.node.getContentSize();
this.node_scroll_view.setContentSize(e);
},
initEvent: function() {
var e = this;
this.btn_close.quickBt(function() {
e._fInRotation ? gWordMgr.showTip("请等待转动结束") : UICtrl.closeUI(e);
});
this.btn_address.quickBt(function() {
UICtrl.openUI("uiFreeLottery/uiFreeLotteryAddress");
});
this.img_arraw.quickBt(function() {
e.startRotation();
}, !0);
this.btn_rule.quickBt(function() {
UICtrl.openUI("uiFreeLottery/uiFreeLotteryRule");
});
this.btn_record.quickBt(function() {
UICtrl.openUI("uiFreeLottery/uiFreeLotteryRecord");
});
},
initTitle: function() {
console.log("TODO-uiFreeLottery-initTitle()");
this.lbl_banner_title.getComponent(cc.Label).string = "集齐碎片送iphone12" + this._fRoundType;
//1 == this._fRoundType ? this.lbl_banner_title.getComponent(cc.Label).string = "集齐碎片送iphone11pro" : this.lbl_banner_title.getComponent(cc.Label).string = "集齐碎片送iphoneX";
},
initData: function() {
this._fInRotation = !1;
this._fCurrIndex = 1;
this._fRoundType = gFreeLotteryMgr.getRoundType();
this._fGetFirstMoney = pageData.getHasGetLotteryMoney();
this._jsonData = pageData.msgGetPhoneConfig();
},
initLottory: function() {
this.tableConfig = {};
var e = [];
e = 1 == this._fRoundType ? gFreeLotteryMgr.cFreeLotteryRoller[0] : gFreeLotteryMgr.cFreeLotteryRoller[1];
this.tableConfig = e;
this.changeFirstMoney();
var t = this.node_Items.getChildren();
this.itemList = t;
this.updateLottery();
},
updateLottery: function() {
var e = this;
this.itemList.forEach(function(t, i) {
var n = e.tableConfig[i], o = itemCsvData.getItemIcon(n), a = itemCsvData.getItemNameIcon(n);
t.img_triangle.active = !1;
util.display(t.img_goods, o);
util.display(t.lbl_goods_name, a);
});
},
updateTicket: function() {
console.log("TODO-uiFreeLottery-updateTicket()");
this.lbl_ticket.getComponent(cc.Label).string = gameData.gDayLotteryTicket + "/每日抽福利" + gFreeLotteryMgr.cFreeLotteryFreeTime;
if (gFreeLotteryMgr.cFreeLotteryFreeTime - gameData.gDayLotteryTicket < gFreeLotteryMgr.getFreeTimesToday()) {
this.img_arraw_direct.active = !0;
this.img_arraw_video.active = !1;
} else {
//this.img_arraw_direct.active = !1;
//this.img_arraw_video.active = !0;
this.img_arraw_direct.active = !0;
this.img_arraw_video.active = !1;
}
},
updateRoundDay: function() {
var e = gFreeLotteryMgr.getBusinessBeginDay(), t = gFreeLotteryMgr.getBusinessEndDay(), i = util.changeDateFormat(e, -3), n = util.changeDateFormat(t, -3);
console.log("TODO-uiFreeLottery-updateRoundDay()e=" + e + " t" + t + " i" + i + " n" + n);
this.lbl_round_time.getComponent(cc.Label).string = i + "~活动时间A" + n;
},
updatePicesAward: function() {
var e = this;
this.img_item_list.getChildren().forEach(function(t, i) {
var n = i;
0 == i ? n = 1 : 1 == i && (n = 0);
var o = e.tableConfig[n], a = itemCsvData.getItemIcon(o), s = itemCsvData.getItemName(o), r = itemCsvData.getItemMax(o);
console.log("TODO-uiFreeLottery-updatePicesAward()1i=" + i + " n=" + n + " o=" + o);
t.lbl_item_name.getComponent(cc.Label).string = s + "名字";
util.display(t.img_item, a);
var c = gFreeLotteryMgr.getItemPices(o) || 0, l = itemCsvData.getItemLimit(o);
11 != o && c > l && (c = l);
var u = c / r;
u > 1 && (u = 1);
console.log("TODO-uiFreeLottery-updatePicesAward()2c=" + c + " l=" + l + " u=" + u + " r=" + r + " _fGetFirstMoney=" + e._fGetFirstMoney);
t.lbl_item_process.getComponent(cc.Label).string = c + "/进度" + r;
t.img_item_process.getComponent(cc.Sprite).fillRange = u;
console.log("TODO-uiFreeLottery-updatePicesAward()3gVideoTipMgr.cVideoTouchBeforeWallet=" + gVideoTipMgr.cVideoTouchBeforeWallet + " gameData.gDayWalletVideoTip[G_WALLET_WAY.PHONE]=" + gameData.gDayWalletVideoTip[G_WALLET_WAY.PHONE]);
if (!e._fGetFirstMoney && 11 == o && c >= r) {
t.img_tixian.active = !0;
t.img_item_process_bg.active = !1;
t.unbindTouch();
t.btn_tixian.quickBt(function() {
!gVideoTipMgr.cVideoTouchBeforeWallet || gameData.gDayWalletVideoTip[G_WALLET_WAY.PHONE] ? pageData.msgGetLotteryMoney(function() {
e._fGetFirstMoney = !0;
pageData.setHasGetLotteryMoney();
e.changeFirstMoney(o);
e.updateLottery();
e.updatePicesAward();
}) : UICtrl.openUI("uiVideoTip/uiVideoTipWallet2", function(e) {
e.init(G_WALLET_WAY.PHONE);
});
});
} else {
t.img_tixian.active = !1;
t.img_item_process_bg.active = !0;
t.quickBt(function() {
gWordMgr.showTip("碎片不足，转盘抽奖可获得碎片");
}, !0);
}
});
},
changeFirstMoney: function() {
if (this._fGetFirstMoney) {
var e = gFreeLotteryMgr.cFreeLotteryRoller[2];
for (var t in this.tableConfig) {
11 == this.tableConfig[t] && (this.tableConfig[t] = e);
}
}
},
startRotation: function() {
console.log("TODO-uiFreeLottery-startRotation()1_fInRotation=" + this._fInRotation + " gDayLotteryTicket=" + gameData.get("gDayLotteryTicket"));
var e = this;
if (gameData.get("gDayLotteryTicket") <= 9) gameData.set("gDayLotteryTicket", 10);
console.log("TODO-uiFreeLottery-startRotation()2_fInRotation=" + this._fInRotation + " gDayLotteryTicket=" + gameData.get("gDayLotteryTicket"));
this._fInRotation || (gameData.get("gDayLotteryTicket") <= 0 ? gWordMgr.showTip("今日已全部抽完，0点后补充次数") : this.img_arraw_direct.active ? this.toRotation() : shareData.toVideo(function(t) {
webData.msgSaveVideo(G_VIDEO_FROM.PHONE_TICKET, function() {
gameData.gLotteryVideo[2] = gameData.gLotteryVideo[2] + 1;
gameData.save("gLotteryVideo");
e.toRotation();
}, t);
}));
},
toRotation: function() {
var e = this;
this._fInRotation = !0;
this.getRollItem(function(t) {
e.beginRotation(t);
});
},
getRollItem: function(e) {
console.log("TODO-uiFreeLottery-getRollItem()1_fRoundType=" + this._fRoundType + " _fGetFirstMoney=" + this._fGetFirstMoney);
console.log("TODO-uiFreeLottery-getRollItem()2gameData.gLotterySaveMoney" + JSON.stringify(gameData.gLotterySaveMoney));
console.log("TODO-uiFreeLottery-getRollItem()3gameData.gLotteryVideo[2]" + gameData.gLotteryVideo[2] + "gFreeLotteryMgr.cFreeLotteryLimit[0]" + gFreeLotteryMgr.cFreeLotteryLimit[0]);
if (1 == this._fRoundType) if (this._fGetFirstMoney) {
for (var t in gameData.gLotterySaveMoney) if (-1 != t) {
var i = gameData.gLotterySaveMoney[t], n = {};
n.currID = i[0];
if (11 != n.currID) {
n.currNUM = i[1];
n.currIndex = i[2];
delete gameData.gLotterySaveMoney[t];
gameData.save("gLotterySaveMoney");
console.log("[手机抽奖]直接给存储的2元红包", n);
e(n);
return;
}
}
} else if (gameData.gLotteryVideo[2] >= gFreeLotteryMgr.cFreeLotteryLimit[0]) for (var o in gameData.gLotterySaveMoney) if (-1 != o) {
var a = gameData.gLotterySaveMoney[o], s = {};
s.currID = a[0];
if (11 == s.currID) {
s.currNUM = a[1];
s.currIndex = a[2];
delete gameData.gLotterySaveMoney[o];
gameData.save("gLotterySaveMoney");
console.log("[手机抽奖]直接给存储的3毛红包", s);
e(s);
return;
}
}
var r = gameData.gWeakLotteryIndex[2], c = this._jsonData[r];
console.log("TODO-uiFreeLottery-getRollItem()4gameData.gWeakLotteryIndex[2]" + gameData.gWeakLotteryIndex[2] + " c=" + JSON.stringify(c));
if (c) {
if (1 == this._fRoundType) {
c.rID = c.goodsid;
c.rNum = c.num;
} else {
c.rID = c.goodsid2;
c.rNum = c.num2;
}
console.log("TODO-uiFreeLottery-getRollItem()");
console.log("[手机抽奖]抽奖次数", r, c.rID, c.rNum);
if (1 == this._fRoundType) {
if (11 == c.rID) {
var l = gFreeLotteryMgr.getItemPices(c.rID) || 0;
if (l >= gFreeLotteryMgr.cFreeLotteryLimit[1] && gameData.gLotteryVideo[2] < gFreeLotteryMgr.cFreeLotteryLimit[0]) {
console.log("[手机抽奖]抽到红包达到上限看视频次数不足下一个", gameData.gLotteryVideo[2], l, gFreeLotteryMgr.cFreeLotteryLimit[0], gFreeLotteryMgr.cFreeLotteryLimit[1]);
var u = this.getIDInIndex(c.rID);
gameData.gLotterySaveMoney[r] = [ 11, c.num, u ];
gameData.save("gLotterySaveMoney");
gameData.gWeakLotteryIndex[2]++;
gameData.save("gWeakLotteryIndex");
this.getRollItem(e);
return;
}
}
if (!this._fGetFirstMoney && c.rID == gFreeLotteryMgr.cFreeLotteryRoller[2]) {
console.log("[手机抽奖]没提现过随机到第二个红包不给");
var h = this.getIDInIndex(11);
gameData.gLotterySaveMoney[r] = [ gFreeLotteryMgr.cFreeLotteryRoller[2], c.num, h ];
gameData.save("gLotterySaveMoney");
gameData.gWeakLotteryIndex[2]++;
gameData.save("gWeakLotteryIndex");
this.getRollItem(e);
return;
}
}
var d = itemCsvData.getItemLimit(c.rID), g = gFreeLotteryMgr.getItemPices(c.rID) || 0;
if (g >= d) {
console.log("[手机抽奖]达到上限不给", c.rID, d, g);
gameData.gWeakLotteryIndex[2]++;
gameData.save("gWeakLotteryIndex");
this.getRollItem(e);
} else {
var f = this.getIDInIndex(c.rID);
if (-1 == f) return e({
currIndex: -1
});
var p = {};
p.currIndex = f;
p.currID = c.rID;
p.currNUM = c.rNum;
e(p);
}
} else e({
currIndex: -1
});
},
getIDInIndex: function(e) {
for (var t in this.tableConfig) {
if (e == this.tableConfig[t]) return parseInt(t) + 1;
}
return -1;
},
beginRotation: function(e) {
console.log("TODO-uiFreeLottery-beginRotation()1e" + JSON.stringify(e) + " _fCurrIndex" + this._fCurrIndex);
console.log("TODO-uiFreeLottery-beginRotation()2gameData.gWeakLotteryIndex[2]" + gameData.gWeakLotteryIndex[2]);
var t = e.currIndex;
if (-1 != t) {
var i = 6 - t + this._fCurrIndex;
this.resetYellowOfItem();
audioData.playSoundByID(11);
this.rotationWitchAngle(i, function() {
this._fCurrIndex = t;
this.setYellowOfItem(t);
gameData.plus("gDayLotteryTicket", -1);
gameData.gWeakLotteryIndex[2] = gameData.gWeakLotteryIndex[2] + 1;
gameData.save("gWeakLotteryIndex");
webData.msgSendRecore(G_WINDOW_FROM.PHONE_ROLL);
this.updateTicket();
this.showAward(e);
});
} else {
gWordMgr.showTip("抽奖错误");
gameData.plus("gDayLotteryTicket", -1);
gameData.gWeakLotteryIndex[2] = gameData.gWeakLotteryIndex[2] - 10;
gameData.save("gWeakLotteryIndex");
this._fInRotation = !1;
this.updateTicket();
}
},
resetYellowOfItem: function() {
this.itemList.forEach(function(e) {
e.img_triangle.active = !1;
});
},
setYellowOfItem: function(e) {
this.itemList.forEach(function(t, i) {
t.img_triangle.active = i == e - 1;
});
},
rotationWitchAngle: function(e, t) {
var i = 60 * e + 3600, n = cc.rotateBy(3, i);
n.easing(cc.easeCircleActionInOut());
var o = cc.callFunc(t, this), a = cc.sequence(n, o);
this.node_Cricle.runAction(a);
},
showAward: function(e) {
var t = this;
audioData.playSoundByID(12);
UICtrl.openUI("uiFreeLottery/uiFreeLotteryAward", function(i) {
i.initSingleAward(e, function() {
t.updatePicesAward();
});
});
this.scheduleOnce(function() {
t._fInRotation = !1;
t.img_arraw.canTouch = !0;
}, .5);
}
});
cc._RF.pop();
}, {} ],
uiFriendGroupAwardInfo: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "78617TSGhRFXJs0hv9bCWzO", "uiFriendGroupAwardInfo");
cc.Class({
extends: e("uiWindowBase"),
properties: {},
start: function() {
this.initEvent();
},
initEvent: function() {
var e = this;
this.btn_close.quickBt(function() {
UICtrl.closeUI(e);
});
this.btn_get.quickBt(function() {
e.playSpriteShake();
});
},
playSpriteShake: function() {
this.img_award_bg.stopAllActions();
this.img_award_bg.x = 0;
this.img_award_bg.runAction(cc.repeat(cc.sequence(cc.moveBy(.07, cc.v2(-15, 0)), cc.moveBy(.07, cc.v2(15, 0))), 3));
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiFriendGroupAward: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "2a6fdPxhnJNdpvtxgIhu+PX", "uiFriendGroupAward");
cc.Class({
extends: e("uiWindowBase"),
properties: {},
start: function() {
this.initEvent();
},
initEvent: function() {
var e = this;
this.btn_recv.quickBt(function() {
if (e._inOpen) gWordMgr.showTip("等待开奖结束"); else {
e.playMoneyFly();
UICtrl.closeUI(e);
}
});
},
initPowerAward: function(e) {
this.playOpenAward();
var t = this.node_awards.getChildren();
for (var i in t) {
var n = t[i], o = 0, a = 0;
if (0 == i) {
o = e.RewardNum1;
a = e.RewardType1;
} else if (1 == i) {
o = e.RewardNum2;
a = e.RewardType2;
} else if (2 == i) {
o = e.RewardNum3;
a = e.RewardType3;
} else if (3 == i) {
o = e.RewardNum4;
a = e.RewardType4;
} else if (4 == i) {
o = e.RewardNum5;
a = e.RewardType5;
}
if (1 == a) {
gFriendGroupMgr.groupRed = gFriendGroupMgr.groupRed + o;
util.display(n.img_award, "image/normal/hongbao");
n.lbl_item_name.getComponent(cc.Label).string = o / 1e4 + "元现金";
this.inesertMoneyNode(n);
} else {
var s = towerCsvData.getLowFreeID(gameData.gMaxTower) + o;
s > gameData.gMaxTower && (s = gameData.gMaxTower);
s > 71 && (s = 71);
var r = towerCsvData.getAttacIconByID(s), c = "Lv." + s;
util.display(n.img_award, r);
gTowerMgr.forceCreateTower(s);
n.lbl_item_name.getComponent(cc.Label).string = c;
n.img_award.scale = 1.2;
}
}
gFriendGroupMgr.groupPower = e.UnionEnergy;
},
initTimeAward: function(e) {
this.item_award_2.removeFromParent();
this.item_award_3.removeFromParent();
this.item_award_4.removeFromParent();
this.item_award_5.removeFromParent();
this.item_award_1.position = cc.v2(0, 0);
this.playOpenAward();
var t = parseInt(e.AddUnionRed);
this.item_award_1.lbl_item_name.getComponent(cc.Label).string = t / 1e4 + "元现金";
util.display(this.item_award_1.img_award, "image/normal/hongbao");
gFriendGroupMgr.groupRed = gFriendGroupMgr.groupRed + t;
this.inesertMoneyNode(this.item_award_1);
},
playOpenAward: function() {
var e = this, t = this.node_awards.getChildren(), i = this.node_awards.childrenCount, n = function(i) {
var n = t[i];
e.scheduleOnce(function() {
gWordMgr.showArtEffect("effect/kaibaoxiang", n, null, function() {
n.node_buff.active = !0;
n.img_award.active = !0;
n.lbl_item_name.active = !0;
n.img_award_close.active = !1;
});
}, .5 * i);
};
for (var o in t) n(o);
this._inOpen = !0;
var a = .5 * i + .5;
this.scheduleOnce(function() {
e._inOpen = !1;
}, a);
},
inesertMoneyNode: function(e) {
this._moneyNode || (this._moneyNode = []);
this._moneyNode.push(e);
},
playMoneyFly: function() {
this._moneyNode && gFriendGroupMgr.flyLineMoney();
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiFriendGroupContributionDesc: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "7ed01Uz4hZCsY3A6d8Jr82G", "uiFriendGroupContributionDesc");
cc.Class({
extends: e("uiWindowBase"),
properties: {},
start: function() {
this.initEvent();
},
initEvent: function() {
var e = this;
this.btn_close.quickBt(function() {
UICtrl.closeUI(e);
});
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiFriendGroupDescription: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "d2116UNnZ1Hqbqi1yC3PejC", "uiFriendGroupDescription");
cc.Class({
extends: e("uiWindowBase"),
properties: {},
start: function() {
this.initEvent();
},
initEvent: function() {
var e = this;
this.btn_close.quickBt(function() {
UICtrl.closeUI(e);
});
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiFriendGroupEarnings: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "a1d5btXWCpBV5ejnLmvUSSy", "uiFriendGroupEarnings");
var n = [ 1, 1, 1, 1, 1, 1, 2, 2, 4, 6, 8 ];
cc.Class({
extends: e("uiWindowBase"),
properties: {},
start: function() {
this.initEvent();
this.initData();
},
initEvent: function() {
var e = this;
this.btn_close.quickBt(function() {
UICtrl.closeUI(e);
});
},
initData: function() {
for (var e = gFriendGroupMgr.groupLevel, t = 0; t < n.length; t++) {
var i = n[t], o = t + 1;
i && i > e ? cc.isValid(this["img_unlock_bg_" + o]) && (this["img_unlock_bg_" + o].active = !0) : i && i <= e && cc.isValid(this["img_unlock_bg_" + o]) && (this["img_unlock_bg_" + o].active = !1);
}
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiFriendGroupHumenInfo: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "847cdkpMJhA/YtxHf5dAWni", "uiFriendGroupHumenInfo");
cc.Class({
extends: e("uiWindowBase"),
properties: {},
start: function() {
this.initEvent();
},
initEvent: function() {
var e = this;
this.btn_close.quickBt(function() {
UICtrl.closeUI(e);
});
this.btn_ok.quickBt(function() {
UICtrl.closeUI(e);
});
},
initData: function(e, t) {
var i = this;
this.img_shifu_title.active = 1 == e;
this.img_tudi_title.active = 2 == e;
this.img_tusun_title.active = 3 == e;
if (1 == e) {
this.lbl_history_cb.active = !1;
this.lbl_history_cb_title.active = !1;
}
webData.msgGetUnionMemberInfo(e, t, function(e) {
if (cc.isValid(i.node)) {
var t = e, n = t.NickName || " ";
n = util.cutstr(n, 10);
i.lbl_nickname.getComponent(cc.Label).string = n;
i.lbl_son_number.getComponent(cc.Label).string = "lv." + t.Level;
i.lbl_yestoday_cb.getComponent(cc.Label).string = t.TdCount;
i.lbl_history_cb.getComponent(cc.Label).string = t.AllExp;
util.setHead(i.img_head, i, t.HeadUrl);
}
});
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiFriendGroupInvite: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "9bfdaZHN5pFEpbxjV7aRtQJ", "uiFriendGroupInvite");
cc.Class({
extends: e("uiWindowBase"),
properties: {},
start: function() {
var e = this;
this.btn_close.quickBt(function() {
UICtrl.closeUI(e);
});
this.btn_main_invite.quickBt(function() {
gFriendGroupMgr.openSharePage();
});
this.initData();
this.initInvite();
},
initData: function() {
this.node_item.active = !1;
for (var e = 1; e <= 10; e++) {
var t = 0;
e <= gFriendGroupMgr.gInviteAwardID ? t = 2 : e <= gFriendGroupMgr.groupVerifySonNumber && e >= gFriendGroupMgr.gInviteAwardID && (t = 1);
var i = gCloundMgr.cUnionFamilyInviteExp[e - 1], n = gCloundMgr.cUnionFamilyInviteRed[e - 1];
this.createItem(e, i, n, t);
}
},
initInvite: function() {
this.lbl_invite_require.getComponent(cc.Label).string = "有效用户:炮塔等级达到" + gCloundMgr.cFriendGroupInviteRequire + "级";
},
createItem: function(e, t, i, n) {
var o = cc.instantiate(this.node_item);
o.parent = this.scrollview_content;
o.active = !0;
o.lbl_title_number.getComponent(cc.Label).string = e;
o.lbl_money_value.getComponent(cc.Label).string = (i / 1e4).toFixed(2) + "元";
o.lbl_point_value.getComponent(cc.Label).string = t;
if (1 == n) {
o.btn_can_get.active = !0;
o.btn_to_get.active = !1;
o.btn_has_get.active = !1;
} else if (2 == n) {
o.btn_can_get.active = !1;
o.btn_to_get.active = !1;
o.btn_has_get.active = !0;
} else {
o.btn_can_get.active = !1;
o.btn_to_get.active = !0;
o.btn_has_get.active = !1;
}
if (e % 5 == 0) {
o.img_bg_1.active = !1;
o.lbl_title.color = new cc.color().fromHEX("#FFFFFF");
o.lbl_title_2.color = new cc.color().fromHEX("#FFFFFF");
o.lbl_get_title.color = new cc.color().fromHEX("#FFFFFF");
o.lbl_money_value.color = new cc.color().fromHEX("#FFFFFF");
o.lbl_point_value.color = new cc.color().fromHEX("#FFFFFF");
o.lbl_title_number.color = new cc.color().fromHEX("#004EFF");
} else o.img_bg_2.active = !1;
o.btn_to_get.quickBt(function() {
gFriendGroupMgr.openSharePage();
});
o.btn_can_get.quickBt(function() {
gFriendGroupMgr.gInviteAwardID + 1 < e ? gWordMgr.showTip("请先领取前一个奖励") : webData.msgReceiveInvitationAward(e, function(e) {
gFriendGroupMgr.gInviteAwardID = e.ID;
gFriendGroupMgr.addPowerPoint(e.Energy);
gFriendGroupMgr.onAddGroupRedNum(e.Money);
o.btn_can_get.active = !1;
o.btn_to_get.active = !1;
o.btn_has_get.active = !0;
gFriendGroupMgr.flyLineMoney();
gWordMgr.showTip("领取成功！");
});
});
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiFriendGroupMaster: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "bcb594P+JlFI7eBB6pV4cE0", "uiFriendGroupMaster");
cc.Class({
extends: e("uiWindowBase"),
properties: {},
start: function() {
this.initEvent();
this.addEditBoxListener();
this.lbl_cursor.active = !1;
this.playCursorAnim();
},
initEvent: function() {
var e = this;
this.btn_close.quickBt(function() {
UICtrl.closeUI(e);
});
this.btn_confirm.quickBt(function() {
e.sendMessage();
});
this.btn_copy.quickBt(function() {
e.onCopyMyCode();
});
this.lbl_code.setLabel(gameData.userID);
},
addEditBoxListener: function() {
this.edit_box.on("editing-did-began", this.onEditDidBegan, this);
this.edit_box.on("text-changed", this.onTextChanged, this);
this.edit_box.on("editing-did-ended", this.onEditDidEnded, this);
this.edit_box.on("editing-return", this.onEditingReturn, this);
},
onEditDidBegan: function(e) {
this.lbl_cursor.active = !0;
this.resetCursorPos();
cc.sys.os == cc.sys.OS_IOS ? this.node_main.y = 300 : this.node_main.y = -300;
},
onTextChanged: function(e) {
this.lbl_cursor.active = !0;
this.resetCursorPos();
},
onEditDidEnded: function(e) {
this.lbl_cursor.active = !1;
this.node_main.y = 348;
},
onEditingReturn: function(e) {
this.lbl_cursor.active = !1;
this.sendMessage();
},
resetCursorPos: function() {
this.lbl_test.getComponent(cc.Label).string = this.edit_box.getComponent(cc.EditBox).string;
this.lbl_test.getComponent(cc.Label)._updateRenderData(!0);
this.lbl_cursor.x = this.lbl_test.width / 2 + 5;
},
playCursorAnim: function() {
this.edit_box.runAction(cc.repeatForever(cc.sequence(cc.callFunc(function() {
this.lbl_cursor.opacity = 255;
}.bind(this)), cc.delayTime(.4), cc.callFunc(function() {
this.lbl_cursor.opacity = 0;
}.bind(this)), cc.delayTime(.4))));
},
requestBind: function(e) {
var t = this;
if (e != gameData.userID) if (e.length < 5 || e.length > 8) gWordMgr.showTip("该邀请码不存在"); else {
var i = new Date().getTime();
Math.floor(i / 1e3) - gameData.gRegTime >= 86400 ? gWordMgr.showTip("注册已超过24小时,不能拜师") : webData.msgBindPromoter(parseInt(e), function() {
gFriendGroupMgr.onSetPromoterID(parseInt(e));
gWordMgr.showTip("拜师成功");
UICtrl.closeUI(t);
});
} else gWordMgr.showTip("不能绑定自己");
},
sendMessage: function() {
this.edit_box.getComponent(cc.EditBox).string.length > 0 ? this.requestBind(this.edit_box.getComponent(cc.EditBox).string) : gWordMgr.showTip("请输入师傅的邀请码");
},
onCopyMyCode: function() {
nativeData.toCopy(gameData.userID.toString());
},
onDestroy: function() {
0 != this.PromotoID && this.closeCallback && this.closeCallback(this.PromotoID);
this.edit_box.off("editing-did-began", this.onEditDidBegan, this);
this.edit_box.off("text-changed", this.onTextChanged, this);
this.edit_box.off("editing-did-ended", this.onEditDidEnded, this);
this.edit_box.off("editing-return", this.onEditingReturn, this);
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiFriendGroupNodeLine: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "0e127mYHkVFx4soZdw35+q4", "uiFriendGroupNodeLine");
var n;
function o(e, t, i) {
t in e ? Object.defineProperty(e, t, {
value: i,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = i;
return e;
}
var a = {
1: [ cc.v2(-290, -356), cc.v2(-190, -356), cc.v2(-47, -356), cc.v2(60, -356), cc.v2(182, -356), cc.v2(310, -356) ],
2: [ cc.v2(-220, -98), cc.v2(15, -98), cc.v2(210, -98) ],
3: [ cc.v2(0, 170) ]
}, s = (o(n = {}, 1, [ a[1][0], a[2][0] ]), o(n, 2, [ a[1][1], a[2][0] ]), o(n, 3, [ a[1][2], a[2][1] ]), 
o(n, 4, [ a[1][3], a[2][1] ]), o(n, 5, [ a[1][4], a[2][2] ]), o(n, 6, [ a[1][5], a[2][2] ]), 
o(n, 7, [ a[2][0], a[3][0] ]), o(n, 8, [ a[2][1], a[3][0] ]), o(n, 9, [ a[2][2], a[3][0] ]), 
n), r = [ "m05", "m06", "m08", "m12", "m15", "m20" ];
cc.Class({
extends: cc.Component,
properties: {
wordPrefab: cc.Prefab
},
start: function() {
this.playWordAnimationCricle();
},
playWordAnimationCricle: function() {
var e = this;
this.schedule(function() {
var t = util.randomRange(1, 9), i = s[t];
e.playWordAnimation(i);
}, .8);
},
playWordAnimation: function(e) {
var t = cc.instantiate(this.wordPrefab);
t.parent = this.node;
util.display(t, this.getRandomImagePath());
t.position = e[0];
var i = cc.moveTo(4, e[1]), n = cc.delayTime(3), o = cc.fadeTo(1, 0), a = cc.sequence(n, o), s = cc.spawn(a, i), r = cc.removeSelf();
t.runAction(cc.sequence(s, r));
},
getRandomImagePath: function() {
var e = util.randomRange(0, r.length - 1);
return "image/friendgroup/" + r[e];
}
});
cc._RF.pop();
}, {} ],
uiFriendGroupNodePlatform: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "144919bWm1NS70rJD7VcKAa", "uiFriendGroupNodePlatform");
cc.Class({
extends: cc.Component,
properties: {
platformIndex: 0
},
start: function() {
this.playWave();
},
playWave: function() {
var e = this, t = this.node.position.x;
this.platformIndex = util.randomRange(1, 10);
var i = cc.delayTime(1.5 * this.platformIndex), n = cc.moveTo(4, cc.v2(t, 15)), o = cc.moveTo(8, cc.v2(t, 15)), a = cc.moveTo(8, cc.v2(t, -15)), s = cc.repeatForever(cc.sequence(a, o)), r = cc.callFunc(function() {
e.node.runAction(s);
}), c = cc.sequence(i, n, r);
this.node.runAction(c);
}
});
cc._RF.pop();
}, {} ],
uiFriendGroupNodeTouch: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "d3820AaWahDMICD3AENAf+X", "uiFriendGroupNodeTouch");
cc.Class({
extends: ui.baseLayer,
properties: {},
start: function() {
var e = this;
this.node.on(cc.Node.EventType.TOUCH_START, function(t) {
e.hideVerifyBanner();
});
},
showVerifyBanner: function(e) {
this.node.active = !0;
this.img_verify_detail.position = e;
e.x > 100 ? this.img_verify_detail.anchorX = 1 : e.x < -100 ? this.img_verify_detail.anchorX = 0 : this.img_verify_detail.anchorX = .5;
},
hideVerifyBanner: function() {
this.node.active = !1;
}
});
cc._RF.pop();
}, {} ],
uiFriendGroupPointWord: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "fe3e6MNTkJBAZUnq9fWvVKo", "uiFriendGroupPointWord");
cc.Class({
extends: ui.baseLayer,
properties: {},
start: function() {},
initScript: function(e) {
this.lbl_point_value.getComponent(cc.Label).string = "+" + e;
this.node.position = cc.v2(150, -50);
var t = cc.delayTime(2), i = cc.fadeTo(1, 0), n = cc.sequence(t, i), o = cc.moveTo(3, cc.v2(150, 200)), a = cc.spawn(n, o), s = cc.removeSelf(), r = cc.sequence(a, s);
this.node.runAction(r);
}
});
cc._RF.pop();
}, {} ],
uiFriendGroupPoint: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "7b157dy9vpMc6i5jFC8ZZbe", "uiFriendGroupPoint");
cc.Class({
extends: ui.baseLayer,
properties: {},
start: function() {
var e = this;
this.node.quickBt(function() {
e.node.stopAllActions();
gFriendGroupMgr.flyAllPointItem();
});
this.playJelly();
},
initValue: function(e, t) {
this._point = e;
this.lbl_point_value.getComponent(cc.Label).string = t ? "g+" + e : e;
},
flyToBall: function(e) {
var t = this, i = util.convetOtherNodeSpaceAR(this.node.parent, e).clone(), n = cc.v2(-i.x, -i.y), o = this.node.position.sub(i).mag() / util.randomRange(300, 700), a = cc.moveTo(o, n), s = cc.callFunc(function() {
audioData.playSoundByID(14, !0, 2);
t.node.destroy();
});
this.node.runAction(cc.sequence(a, s));
},
playWave: function() {
var e = this, t = this.node.position.x, i = cc.delayTime(1), n = cc.moveTo(4, cc.v2(t, 10)), o = cc.moveTo(8, cc.v2(t, 10)), a = cc.moveTo(8, cc.v2(t, -20)), s = cc.repeatForever(cc.sequence(a, o)), r = cc.callFunc(function() {
e.node.runAction(s);
}), c = cc.sequence(i, n, r);
this.node.runAction(c);
},
playJelly: function() {
function e(e) {
var t = cc.scaleTo(e.time, e.scale_x, e.scale_y), i = cc.fadeIn(e.time);
return cc.spawn(t, i);
}
var t = cc.delayTime(1), i = e({
time: .06,
scale_x: .63,
scale_y: 1.3,
scale_z: 1
}), n = e({
time: .12,
scale_x: 1.1,
scale_y: .7,
scale_z: 1
}), o = e({
time: .07,
scale_x: .8,
scale_y: 1.1,
scale_z: 1
}), a = e({
time: .07,
scale_x: 1.1,
scale_: .95,
scale_z: 1
}), s = e({
time: .07,
scale_x: 1,
scale_y: 1,
scale_z: 1
}), r = cc.sequence(t, i, n, o, a, s), c = cc.repeatForever(r);
this.node.runAction(c);
}
});
cc._RF.pop();
}, {} ],
uiFriendGroupRecord: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "b75acAkpRFCko5p+aEMyhny", "uiFriendGroupRecord");
cc.Class({
extends: e("uiWindowBase"),
properties: {},
start: function() {
var e = this;
this.btn_close.quickBt(function() {
UICtrl.closeUI(e);
});
this.initData();
},
initData: function() {
var e = this;
webData.msgGetContributeRecord(function(t) {
e.insertData(t);
});
},
insertData: function(e) {
for (var t in e) this.createItem(e[t]);
},
createItem: function(e) {
var t = cc.instantiate(this.node_item);
t.parent = this.scrollview_content;
t.active = !0;
t.lbl_msg = e.id;
t.lbl_my.setLabel(e.SelfExp);
t.lbl_son.setLabel(e.TdExp);
t.lbl_gradeSon.setLabel(e.TsExp);
var i = e.SelfExp + e.TdExp + e.TsExp;
t.lbl_total.setLabel(i);
t.lbl_day.setLabel(util.changeDateFormat2(e.Time, 2));
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiFriendGroupRedDesc: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "21443Z+JEFEy7OjbDzSit7e", "uiFriendGroupRedDesc");
var n = [ 1, 1, 1, 1, 1, 1, 2, 2, 4, 6, 8 ];
cc.Class({
extends: e("uiWindowBase"),
properties: {},
start: function() {
this.initEvent();
this.initData();
},
initEvent: function() {
var e = this;
this.btn_close.quickBt(function() {
UICtrl.closeUI(e);
});
},
initData: function() {
for (var e = gFriendGroupMgr.groupLevel, t = 0; t < n.length; t++) {
var i = n[t], o = t + 1;
i && i > e ? cc.isValid(this["img_unlock_bg_" + o]) && (this["img_unlock_bg_" + o].active = !0) : i && i <= e && cc.isValid(this["img_unlock_bg_" + o]) && (this["img_unlock_bg_" + o].active = !1);
}
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiFriendGroupShare2: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "c1be5BulYRC2r962QD6d7jZ", "uiFriendGroupShare2");
var n;
function o(e, t, i) {
t in e ? Object.defineProperty(e, t, {
value: i,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = i;
return e;
}
var a = (o(n = {}, 1, {
BG: "image/shareImg/z1",
ImgTitle: "image/shareImg/dabao1",
nameColor: "#000000",
descColor: "#000000"
}), o(n, 2, {
BG: "image/shareImg/z2",
ImgTitle: "image/shareImg/dabao2",
nameColor: "#FFFFFF",
descColor: "#FFFEB8"
}), o(n, 3, {
BG: "image/shareImg/z3",
ImgTitle: "image/shareImg/dabao1",
nameColor: "#000000",
descColor: "#000000"
}), o(n, 4, {
BG: "image/shareImg/z4",
ImgTitle: "image/shareImg/dabao2",
nameColor: "#FFFFFF",
descColor: "#FFFEB8"
}), o(n, 5, {
BG: "image/shareImg/z5",
ImgTitle: "image/shareImg/dabao3",
nameColor: "#000000",
descColor: "#000000"
}), o(n, 6, {
BG: "image/shareImg/z6",
ImgTitle: "image/shareImg/dabao1",
nameColor: "#000000",
descColor: "#000000"
}), n);
cc.Class({
extends: ui.baseDlg,
properties: {},
start: function() {
var e = this;
shareData.getShareUrl(function(t) {
t && e.initShare(t);
});
this.initEvent();
},
initShare: function(e) {
if (cc.isValid(this.node)) {
var t = gameData.nickname ? gameData.nickname : gameData.userID;
t = util.cutstr(t, 5);
var i = util.randomListRange(1, 6, 6), n = this.node_page_view.getComponent(cc.PageView).getPages(), o = function(o) {
var s = n[o], r = a[i[o]];
util.display(s, r.BG);
util.display(s.img_title_game, r.ImgTitle);
s.lbl_name.color = new cc.color().fromHEX(r.nameColor);
s.lbl_name.getComponent(cc.Label).string = "Hi，我是" + t;
s.lbl_des_1.color = new cc.color().fromHEX(r.descColor);
s.lbl_des_2.color = new cc.color().fromHEX(r.descColor);
s.lbl_des_3.color = new cc.color().fromHEX(r.descColor);
s.img_qrcode.getComponent("drawQRCode").draw(e);
cc.loader.load({
url: gameData.headWeb,
type: "png"
}, function(e, t) {
e && console.error(e);
s.img_head.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(t);
console.log("绘制头像成功返回");
});
};
for (var s in n) o(s);
this.pageviewCurrPag();
} else UICtrl.closeUI(this);
},
initEvent: function() {
var e = this;
this.btn_wx.quickBt(function() {
e.shareImageTo("WX");
});
this.btn_qq.quickBt(function() {
e.shareImageTo("QQ");
});
this.btn_zone.quickBt(function() {
e.shareImageTo("QZONE");
});
this.btn_cricle.quickBt(function() {
e.shareImageTo("PYX");
});
this.btn_close.quickBt(function() {
UICtrl.closeUI(e);
});
},
pageviewCurrPag: function() {
var e = this.node_page_view.getComponent(cc.PageView).getCurrentPageIndex(), t = this.node_page_view.getComponent(cc.PageView).getPages();
console.log("[pageIndex]", e, t);
for (var i in t) i == parseInt(e) ? t[i].img_gou_icon.active = !0 : t[i].img_gou_icon.active = !1;
},
shareImageTo: function(e) {
var t = this, i = this.node_page_view.getComponent(cc.PageView).getCurrentPageIndex(), n = this.node_page_view.getComponent(cc.PageView).getPages()[i];
n.img_gou_bg.active = !1;
var o = n.getComponent("captureNode").cut(1 / .7);
nativeData.saveTextureToLocal(o, function(i) {
if ("" != i) if (1 == gCloundMgr.cShareType) {
console.log("弹出框说文件已经保存成让他去分享");
nativeData.openShareImg(e, i);
} else t.openShareApp(e); else gWordMgr.showTip("保存图片失败");
UICtrl.closeUI(t);
});
},
openShareApp: function(e) {
gWordMgr.showTip("分享图已保存到相册，请前往分享");
"WX" == e ? nativeData.startApp("com.tencent.mm") : "QQ" == e ? nativeData.startApp("com.tencent.mobileqq") : "QZONE" == e ? nativeData.startApp("com.tencent.mobileqq") : "PYX" == e && nativeData.startApp("com.tencent.mm");
}
});
cc._RF.pop();
}, {} ],
uiFriendGroupShareConfirm: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "d135dGFHD1D6KCBhuj/D8Uh", "uiFriendGroupShareConfirm");
cc.Class({
extends: e("uiWindowBase"),
properties: {},
shareTo: function(e) {
var t = this;
this.btn_close.quickBt(function() {
e && e();
UICtrl.closeUI(t);
});
this.btn_wx.quickBt(function() {
e && e();
nativeData.startApp("com.tencent.mm");
UICtrl.closeUI(t);
});
this.btn_qq.quickBt(function() {
e && e();
nativeData.startApp("com.tencent.mobileqq");
UICtrl.closeUI(t);
});
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiFriendGroupShare: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "14b6cSVOrdELY2IX9PGLnjE", "uiFriendGroupShare");
cc.Class({
extends: e("uiWindowBase"),
properties: {},
start: function() {
var e = this;
shareData.getShareUrl(function(t) {
if (t) {
t = t + "&shareImage=" + gameData.shareImageIndex;
e.initShare(t);
} else {
gWordMgr.showTip("获取分享地址失败");
UICtrl.closeUI(e);
}
});
},
initShare: function(e) {
var t = this;
if (cc.isValid(this.node)) {
var i = gameData.nickname ? gameData.nickname : gameData.userID;
i = util.cutstr(i, 5);
this.lbl_name.getComponent(cc.Label).string = "Hi，我是" + i;
this.img_qrcode.getComponent("drawQRCode").draw(e);
cc.loader.load({
url: gameData.headWeb,
type: "png"
}, function(e, i) {
e && console.error(e);
t.img_head.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(i);
console.log("绘制头像成功返回");
});
var n = shareData.getShareImage(gameData.shareImageIndex);
cc.loader.load({
url: n,
type: "png"
}, function(e, i) {
t.img_share_node.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(i);
});
this.scheduleOnce(function() {
console.log("分享", e);
t.shareImageTo();
}, 1.5);
} else UICtrl.closeUI(this);
},
shareImageTo: function() {
var e = this, t = this.img_share_node.getComponent("captureNode").cut();
cc.sys.isNative ? nativeData.saveTextureToLocal(t, function(t) {
if ("" != t) {
console.log("弹出框说文件已经保存成让他去分享");
nativeData.openShareImg("WX", t);
gMainMgr.getRandomShareImage();
var i = gameData.shareImageIndex + 200;
webData.msgSendRecore(i);
} else gWordMgr.showTip("保存图片失败");
UICtrl.closeUI(e);
}) : UICtrl.closeUI(this);
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiFriendGroupSonItem: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "56268m8WsRPsogixU12cuF7", "uiFriendGroupSonItem");
cc.Class({
extends: ui.baseLayer,
properties: {},
start: function() {
this.initEvent();
},
initEvent: function() {
var e = this;
this.img_plus.quickBt(function() {
gFriendGroupMgr.openSharePage();
});
this.img_bg.quickBt(function() {
gFriendGroupMgr.onOpenFriendGroupHumenInfo(e._sType, e._sUserID);
});
this.img_verify.quickBt(function() {
gFriendGroupMgr.showVerifyBanner(e.img_verify);
});
},
initSon: function(e) {
this._sUserID = e.UserID;
this._sType = 2;
this._sNewExp = e.Exp;
var t = e.Name || " ";
t = util.cutstr(t, 10);
this.lbl_name.getComponent(cc.Label).string = t;
this.lbl_value.getComponent(cc.Label).string = "总贡献:" + e.Exp;
0 == e.Valid ? this.img_verify.active = !0 : this.img_verify.active = !1;
e.HeadUrl && "" != e.HeadUrl && util.setHead(this.img_head, this, e.HeadUrl);
if (e.WaitExp > 0) {
this._sNewExp += e.WaitExp;
var i = cc.instantiate(gFriendGroupMgr.getScript().pointPrefab);
i.parent = this.node;
i.getComponent("uiFriendGroupPoint").initValue(e.WaitExp, !0);
gFriendGroupMgr.recordPointItem(i);
}
},
initGrandson: function(e) {
this._sUserID = e.UserID;
this._sType = 3;
this._sNewExp = e.Exp;
this.node_main.scale = .8;
var t = e.Name || " ";
t = util.cutstr(t, 10);
this.lbl_name.getComponent(cc.Label).string = t;
this.lbl_value.getComponent(cc.Label).string = e.Exp;
this.img_verify.active = !1;
e.HeadUrl && "" != e.HeadUrl && util.setHead(this.img_head, this, e.HeadUrl);
if (e.WaitExp > 0) {
this._sNewExp += e.WaitExp;
var i = cc.instantiate(gFriendGroupMgr.getScript().pointPrefab);
i.parent = this.node;
i.getComponent("uiFriendGroupPoint").initValue(e.WaitExp, !1);
gFriendGroupMgr.recordPointItem(i);
}
},
initNone: function() {
this.img_name && (this.img_name.active = !1);
this.img_verify && (this.img_verify.active = !1);
this.img_bg && (this.img_bg.active = !1);
this.img_plus && (this.img_plus.active = !0);
},
updatePoint: function() {
2 == this._sType ? this.lbl_value.getComponent(cc.Label).string = "总贡献:" + this._sNewExp : 3 == this._sType && (this.lbl_value.getComponent(cc.Label).string = this._sNewExp);
}
});
cc._RF.pop();
}, {} ],
uiFriendGroupSonList: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "9a4c8XK6FVGKqXcgnT2H5fv", "uiFriendGroupSonList");
cc.Class({
extends: e("uiWindowBase"),
properties: {},
start: function() {
var e = this;
this.btn_close.quickBt(function() {
UICtrl.closeUI(e);
});
this._currPageMax = 0;
this.addListen();
},
addListen: function() {
this.scrollview_main.on("scroll-to-bottom", this.onScrollToBottom, this);
},
onScrollToBottom: function() {
if (this._currPageMax < 7) console.log("当前页面返回不足10个，说明没有更多邮件了", this._currPageMax); else {
this._currPageMax = 0;
this._pageIndex++;
this.updateListData();
}
},
initApprenticeListInfo: function() {
this.img_title_tudi.active = !0;
this.img_title_tusuo.active = !1;
this._curListType = 1;
this._pageIndex = 1;
this.updateListData();
},
initDiscipleListInfo: function() {
this.img_title_tudi.active = !1;
this.img_title_tusuo.active = !0;
this._curListType = 2;
this._pageIndex = 1;
this.updateListData();
},
updateListData: function() {
var e = this;
1 == this._curListType ? webData.msgGetUnionApprenticeList(this._pageIndex, function(t) {
if (t.TdList && t.TdList.length) {
e._currPageMax = t.TdList.length;
e.insertData(t.TdList);
} else e._currPageMax = 0;
}, function() {
e._currPageMax = 0;
}) : webData.msgGetUnionDiscipleList(this._pageIndex, function(t) {
if (t.TsList && t.TsList.length) {
e._currPageMax = t.TsList.length;
e.insertData(t.TsList);
} else e._currPageMax = 0;
}, function() {
e._currPageMax = 0;
});
},
insertData: function(e) {
for (var t in e) this.createItem(e[t]);
},
createItem: function(e) {
var t = cc.instantiate(this.node_item);
t.parent = this.scrollview_content;
t.active = !0;
t.lbl_nickname.getComponent(cc.Label).string = e.Name;
t.lbl_family_level.getComponent(cc.Label).string = "lv." + e.UnionLevel;
t.lbl_day_contribute_num.getComponent(cc.Label).string = e.Exp;
t.lbl_history_contribute_num.getComponent(cc.Label).string = e.AllExp;
t.img_verify.active = !e.Valid;
util.setHead(t.img_head, this, e.HeadUrl);
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiFriendGroupWalletDescription: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "783aaFW2TxBv5rOvv6eTVr6", "uiFriendGroupWalletDescription");
cc.Class({
extends: e("uiWindowBase"),
properties: {},
start: function() {
this.initEvent();
},
initEvent: function() {
var e = this;
this.btn_close.quickBt(function() {
UICtrl.closeUI(e);
});
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiFriendGroupWalletRecordDetails: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "da2aasReD5NO4wRST60ZTcx", "uiFriendGroupWalletRecordDetails");
cc.Class({
extends: e("uiWindowBase"),
properties: {},
start: function() {
this.initEvent();
},
initEvent: function() {
var e = this;
this.btn_close.quickBt(function() {
UICtrl.closeUI(e);
});
},
initData: function(e) {
this.lbl_msg.setLabel(e);
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiFriendGroupWalletRecord: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "0ff42pTjb9JlIYNC11szOtv", "uiFriendGroupWalletRecord");
var n;
function o(e, t, i) {
t in e ? Object.defineProperty(e, t, {
value: i,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = i;
return e;
}
var a = (o(n = {}, 1, {
desc: "审核中",
color: "#D6362E"
}), o(n, 2, {
desc: "审核成功",
color: "#1A9E24"
}), o(n, 3, {
desc: "审核失败",
color: "#D6362E"
}), n);
cc.Class({
extends: e("uiWindowBase"),
properties: {},
start: function() {
var e = this;
this.btn_close.quickBt(function() {
UICtrl.closeUI(e);
});
this._currPageMax = 0;
this._pageIndex = 1;
this.addListen();
this.initData();
},
addListen: function() {
this.node_scrollview.on("scroll-to-bottom", this.onScrollToBottom, this);
},
onScrollToBottom: function() {
if (this._currPageMax < 7) console.log("当前页面返回不足7个，说明没有更多余额明细了", this._currPageMax); else {
this._currPageMax = 0;
this._pageIndex++;
this.initData();
}
},
initData: function() {
var e = this;
pageData.msgGetUnionRedRecord(this._pageIndex, function(t) {
e._currPageMax = t.length;
e.insertData(t);
e._currPageMax <= 0 && 1 == e._pageIndex && (e.img_no_record_icon.active = !0);
}, function() {
e._currPageMax = 0;
e._currPageMax <= 0 && 1 == e._pageIndex && (e.img_no_record_icon.active = !0);
});
},
insertData: function(e) {
for (var t in e) this.createItem(e[t]);
},
createItem: function(e) {
var t = cc.instantiate(this.node_RecordItem);
t.active = !0;
t.parent = this.node_items;
var i = (e.changeRedMoney / 1e4).toFixed(2);
if (e.changeRedMoney > 0) {
i = "￥ +" + i;
t.lbl_income.color = new cc.color().fromHEX("#46780B");
} else {
i = "￥ " + i;
t.lbl_income.color = new cc.color().fromHEX("#D6363E");
}
t.lbl_title.getComponent(cc.Label).string = e.title;
t.lbl_income.getComponent(cc.Label).string = i;
t.lbl_time.getComponent(cc.Label).string = e.opTime;
t.btn_ckxq.quickBt(function() {
UICtrl.openUI("uiFriendGroup/uiFriendGroupWalletRecordDetails", function(t) {
t.initData(e.remark);
});
});
if (e.remark && "" != e.remark) {
t.btn_ckxq.active = !0;
t.lbl_status.active = !1;
} else {
t.btn_ckxq.active = !1;
if (e.state) {
t.lbl_status.active = !0;
t.lbl_status.setLabel(a[e.state].desc);
t.lbl_status.color = new cc.color().fromHEX(a[e.state].color);
} else t.lbl_status.active = !1;
}
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiFriendGroupWallet: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "01f802ruERB+an3bcTtXfMu", "uiFriendGroupWallet");
cc.Class({
extends: e("uiWindowBase"),
properties: {},
start: function() {
this.initEvent();
this.initData();
},
initEvent: function() {
var e = this;
this.btn_close.quickBt(function() {
UICtrl.closeUI(e);
});
this.btn_withdraw.quickBt(function() {
e.withdrawalApplication();
});
this.btn_record.quickBt(function() {
UICtrl.closeUI(e);
UICtrl.openUI("uiFriendGroup/uiFriendGroupWalletRecord");
});
this.btn_wallet_desc.quickBt(function() {
UICtrl.closeUI(e);
UICtrl.openUI("uiFriendGroup/uiFriendGroupWalletDescription");
});
},
initData: function() {
this.lbl_game_money.setLabel((gFriendGroupMgr.groupRed / 1e4).toFixed(2));
},
withdrawalApplication: function() {
var e = this;
if (gFriendGroupMgr.groupRed < 3e3) gWordMgr.showTip("您当前金额不足0.3元，无法提现"); else {
this.btn_withdraw.canTouch = !1;
var t = gFriendGroupMgr.groupRed;
t > 2e6 && (t = 2e6);
if (!gVideoTipMgr.cVideoTouchBeforeWallet || gameData.gDayWalletVideoTip[G_WALLET_WAY.MASTER]) pageData.msgUnionWithdraw(t, function(t) {
if (cc.isValid(e.node)) {
if (t.success) {
gFriendGroupMgr.onClearGroupRedNum(t.jsonresult);
e.initData();
gWordMgr.showTip(t.msg, 1);
} else gWordMgr.showTip(t.msg, 1);
e.scheduleOnce(function() {
e.btn_withdraw.canTouch = !0;
}, .3);
}
}, function() {
e.btn_withdraw.canTouch = !0;
}); else {
UICtrl.openUI("uiVideoTip/uiVideoTipWallet2", function(e) {
e.init(G_WALLET_WAY.MASTER);
});
this.btn_withdraw.canTouch = !0;
}
}
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiFriendGroup: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "314b9jb8M5KkLzSp0CeGaHN", "uiFriendGroup");
cc.Class({
extends: e("uiWindowBase"),
properties: {
pointPrefab: cc.Prefab,
wordPrefab: cc.Prefab,
sonItemPrefab: cc.Prefab
},
start: function() {
this.initEvent();
gFriendGroupMgr.setScript(this);
this.initUI();
this.initAddPoint();
this.initFirstOpen();
this.preLoadResource();
webData.msgSendRecore(G_WINDOW_FROM.FAMILY);
audioData.switchFamilyZone();
},
preLoadResource: function() {
util.loadCustomResources(void 0, [ "prefab/uiFriendGroup/uiFriendGroupShare" ]);
},
initFirstOpen: function() {
UICtrl.openUI("uiFriendGroup/uiFriendGroupInvite");
},
initEvent: function() {
var e = this;
this.btn_top_master.quickBt(function() {
gFriendGroupMgr.onOpenFriendGroupHumenInfo(1);
});
this.btn_top_earnings.quickBt(function() {
UICtrl.openUI("uiFriendGroup/uiFriendGroupEarnings");
});
this.btn_top_record.quickBt(function() {
UICtrl.openUI("uiFriendGroup/uiFriendGroupRecord");
});
this.btn_top_share.quickBt(function() {
gFriendGroupMgr.openSharePage();
});
this.btn_top_wallet.quickBt(function() {
UICtrl.openUI("uiFriendGroup/uiFriendGroupWallet");
});
this.btn_top_des.quickBt(function() {
UICtrl.openUI("uiFriendGroup/uiFriendGroupDescription");
});
this.node_shuoming.quickBt(function() {
UICtrl.openUI("uiFriendGroup/uiFriendGroupDescription");
}, !0);
this.btn_top_invite.quickBt(function() {
UICtrl.openUI("uiFriendGroup/uiFriendGroupInvite");
});
this.btn_son_more.quickBt(function() {
UICtrl.openUI("uiFriendGroup/uiFriendGroupSonList", function(e) {
e.initApprenticeListInfo();
});
});
this.btn_grandson_more.quickBt(function() {
UICtrl.openUI("uiFriendGroup/uiFriendGroupSonList", function(e) {
e.initDiscipleListInfo();
});
});
this.btn_close.quickBt(function() {
UICtrl.closeUI(e);
});
this.img_point_cricle.quickBt(function() {
e.toGetPowerAward();
});
this.btn_get_money.quickBt(function() {
e.toGetPowerAward();
});
this.img_level_touch.quickBt(function() {
e.toGetTimeAward();
});
this.btn_power_description.quickBt(function() {
UICtrl.openUI("uiFriendGroup/uiFriendGroupRedDesc");
});
this.node_buttom.quickBt(function() {
UICtrl.openUI("uiFriendGroup/uiFriendGroupContributionDesc");
}, !0);
this.btn_get_all.quickBt(function() {
gFriendGroupMgr.flyAllPointItem();
});
},
initUI: function() {
this.lbl_top_title.getComponent(cc.Label).string = "L" + gFriendGroupMgr.groupLevel;
var e = familyLevelCsvData.getCurrSonNumber(gFriendGroupMgr.groupVerifySonNumber, gFriendGroupMgr.groupLevel);
this.lbl_child_process.getComponent(cc.Label).string = e + "/" + gFriendGroupMgr.groupSonMax;
this.img_child_process.getComponent(cc.Sprite).fillRange = e / gFriendGroupMgr.groupSonMax;
this.lbl_son_title.getComponent(cc.Label).string = "徒弟(" + gFriendGroupMgr.groupSonNumber + ")";
this.lbl_grandson_title.getComponent(cc.Label).string = "徒孙(" + gFriendGroupMgr.groupGrandsonNumber + ")";
this.lbl_level_buttom.getComponent(cc.Label).string = "【lv." + gFriendGroupMgr.groupLevel + "】";
this.btn_son_more.active = gFriendGroupMgr.groupSonNumber > 3;
this.btn_grandson_more.active = gFriendGroupMgr.groupGrandsonNumber > 6;
this.initButtomUI();
this.initBall();
this.initBallPoint();
this.initMorePoint();
this.onOpenDoubleContribution();
this.initSonAndGrandson();
this.onShowWalletRedTip();
},
initButtomUI: function() {
if (gFriendGroupMgr.groupRecvTime >= 5) {
this.lbl_buttom_require_max.active = !0;
this.node_buttom_require.active = !1;
this.node_buttom_full.active = !1;
this.img_level_process.getComponent(cc.Sprite).fillRange = 1;
} else {
this.img_level_process.getComponent(cc.Sprite).fillRange = gFriendGroupMgr.groupRecvCount / gFriendGroupMgr.groupRecvMax;
if (gFriendGroupMgr.groupRecvCount >= gFriendGroupMgr.groupRecvMax) {
this.lbl_buttom_require_max.active = !1;
this.node_buttom_require.active = !1;
this.node_buttom_full.active = !0;
this.lbl_buttom_full_2.getComponent(cc.Label).string = gFriendGroupMgr.groupRecvMoney / 1e4 + "元";
this.img_level_logo.getComponent(cc.Animation).play("shakeLong");
} else {
this.lbl_buttom_require_max.active = !1;
this.node_buttom_require.active = !0;
this.node_buttom_full.active = !1;
this.img_level_logo.getComponent(cc.Animation).stop();
var e = gFriendGroupMgr.groupRecvMax - gFriendGroupMgr.groupRecvCount < 0 ? 0 : gFriendGroupMgr.groupRecvMax - gFriendGroupMgr.groupRecvCount;
this.lbl_buttom_tip_2.getComponent(cc.Label).string = e + "次";
this.lbl_buttom_tip_5.getComponent(cc.Label).string = gFriendGroupMgr.groupRecvMoney / 1e4 + "元";
}
}
},
initSonAndGrandson: function() {
for (var e = gFriendGroupMgr.groupSonList, t = 0; t <= 2; t++) {
var i = cc.instantiate(this.sonItemPrefab);
i.parent = this["node_son_" + t];
if (e[t]) {
i.getComponent("uiFriendGroupSonItem").initSon(e[t]);
gFriendGroupMgr.saveSonItem(i);
} else i.getComponent("uiFriendGroupSonItem").initNone();
}
for (var n = gFriendGroupMgr.groupGrandsonList, o = 0; o <= 5; o++) if (n[o]) {
this["node_grandson_" + o].unbindTouch();
var a = cc.instantiate(this.sonItemPrefab);
a.parent = this["node_grandson_" + o];
gFriendGroupMgr.saveSonItem(a);
a.getComponent("uiFriendGroupSonItem").initGrandson(n[o]);
} else this["node_grandson_" + o].quickBt(function() {
gWordMgr.showTip("徒弟招募的玩家，成为你的徒孙");
});
},
onOpenDoubleContribution: function() {
var e = this;
if (gFriendGroupMgr.groupExpBeginTime && gFriendGroupMgr.groupExpTime) {
var t = new Date().getTime();
if (Math.floor(t / 1e3) - gFriendGroupMgr.groupExpBeginTime < gFriendGroupMgr.groupExpTime) {
this.lbl_double_title.setLabel("剩余时间:" + util.ChangeTimeToSeconds(gFriendGroupMgr.groupExpTime - (Math.floor(t / 1e3) - gFriendGroupMgr.groupExpBeginTime)));
this.schedule(function() {
var t = gFriendGroupMgr.groupExpTime - (Math.floor(new Date().getTime() / 1e3) - gFriendGroupMgr.groupExpBeginTime);
if (t > 0) e.lbl_double_title.setLabel("剩余时间:" + util.ChangeTimeToSeconds(t)); else {
e.unscheduleAllCallbacks();
e.setDoubleContributionGray();
}
}, 1);
} else this.setDoubleContributionGray();
} else this.setDoubleContributionGray();
},
setDoubleContributionGray: function() {
this.img_double_bg.active = !1;
this.btn_double_logo.active = !1;
},
initBall: function() {
var e = gFriendGroupMgr.groupPower / 100;
e > 1 && (e = 1);
this.img_power_light.active = e >= 1;
var t = 170 * e - 160;
this.img_point_process.y = t;
this.lbl_ball_process.getComponent(cc.Label).string = gFriendGroupMgr.groupPower + "/100";
},
initBallPoint: function() {
if (gFriendGroupMgr.groupSelfPoint) {
var e = cc.instantiate(this.pointPrefab);
e.parent = this.img_point_cricle;
e.y = 100;
e.getComponent("uiFriendGroupPoint").initValue(gFriendGroupMgr.groupSelfPoint, !0);
gFriendGroupMgr.recordPointItem(e);
}
},
initMorePoint: function() {
if (gFriendGroupMgr.groupOtherPoint > 0) {
this.btn_get_all.active = !0;
this.lbl_get_all.getComponent(cc.Label).string = "g+" + gFriendGroupMgr.groupOtherPoint;
for (var e = 1; e <= 5; e++) {
var t = cc.instantiate(this.pointPrefab);
t.parent = this.img_point_cricle;
t.active = !1;
t.position = cc.v2(285, -110);
t.getComponent("uiFriendGroupPoint").initValue(0, !0);
gFriendGroupMgr.recordPointItem(t);
}
this.btn_son_more.active && (this.btn_son_more.x = 490);
this.btn_grandson_more.active && (this.btn_grandson_more.x = 490);
} else this.btn_get_all.active = !1;
},
toGetPowerAward: function() {
var e = this;
gFriendGroupMgr.groupPower >= 100 ? webData.msgGetUnionPowerAward(function(t) {
UICtrl.openUI("uiFriendGroup/uiFriendGroupAward", function(i) {
i.initPowerAward(t);
gFriendGroupMgr.addRecvRewardTime();
gFriendGroupMgr.groupPower = t.UnionEnergy;
e.initButtomUI();
e.initBall();
});
}) : UICtrl.openUI("uiFriendGroup/uiFriendGroupAwardInfo");
this.btn_get_money_tip.active = !1;
},
toGetTimeAward: function() {
var e = this;
if (gFriendGroupMgr.groupRecvTime >= 5) gWordMgr.showTip("已达到领取次数上限"); else if (gFriendGroupMgr.groupRecvCount >= gFriendGroupMgr.groupRecvMax) webData.msgGetUnionTimeAward(function(t) {
UICtrl.openUI("uiFriendGroup/uiFriendGroupAward", function(i) {
i.initTimeAward(t);
gFriendGroupMgr.groupRecvCount = t.UnionRedCount;
gFriendGroupMgr.setFriendGroupTimeInfo(t.UnionRedIndex);
e.initButtomUI();
});
}); else {
gWordMgr.showArtEffect("effect/linxianjin", this.btn_get_money);
this.btn_get_money.stopAllActions();
this.btn_get_money.x = 0;
this.btn_get_money.runAction(cc.repeat(cc.sequence(cc.moveBy(.07, cc.v2(-15, 0)), cc.moveBy(.07, cc.v2(15, 0))), 3));
gWordMgr.showTip("【领现金】次数不足");
}
},
initAddPoint: function() {
var e = this;
this.schedule(function() {
if (gFriendGroupMgr.groupReadyAddPoint > 300) {
gFriendGroupMgr.groupPower += 20;
gFriendGroupMgr.groupReadyAddPoint -= 20;
e.initBall();
} else if (gFriendGroupMgr.groupReadyAddPoint > 100) {
gFriendGroupMgr.groupPower += 10;
gFriendGroupMgr.groupReadyAddPoint -= 10;
e.initBall();
} else if (gFriendGroupMgr.groupReadyAddPoint > 0) {
gFriendGroupMgr.groupPower += 1;
gFriendGroupMgr.groupReadyAddPoint -= 1;
e.initBall();
}
}, .02);
},
onPlayInviteShake: function(e) {
if (e) this.btn_top_invite.getComponent(cc.Animation).play("levelredtip"); else {
this.btn_top_invite.stopAllActions();
this.btn_top_invite.angle = 0;
}
},
onDestroy: function() {
webData.msgGetUnionTip();
audioData.switchMainZone();
},
onShowWalletRedTip: function() {
if (gFriendGroupMgr.groupRed >= 3e3) {
this.img_top_wallet_tip.active = !0;
this.btn_top_wallet.getComponent(cc.Animation).play("shake");
} else {
this.img_top_wallet_tip.active = !1;
this.btn_top_wallet.getComponent(cc.Animation).stop();
}
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiGameBox: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "61024YKJh1MNbwmZfkYngSt", "uiGameBox");
var n = cc.Enum({
TO_INSTALL: 1,
TO_OPEN: 2,
TO_DOWNLOADING: 3,
TO_WITHDRAWAL: 4
});
cc.Class({
extends: e("uiWindowBase"),
properties: {},
initUI: function() {
this.node.active = !0;
webData.msgSendRecore(G_WINDOW_FROM.GAMEBOX);
},
start: function() {
this.initEvent();
nativeData.checkAppInstalled("com.lwhy.lwxyx") ? 2 == gameData.gBoxUser ? this.switchBtnState(n.TO_WITHDRAWAL) : this.switchBtnState(n.TO_OPEN) : this.switchBtnState(n.TO_INSTALL);
this.updateUI();
webData.msgSendRecore(G_WINDOW_FROM.GAMEBOX);
gameData.set("gOpenWithDrawalWindow", !0);
},
updateUI: function() {
this.lbl_red_num.getComponent(cc.Label).string = gameData.gBoxMoney;
this.lbl_install_des_2.getComponent(cc.Label).string = "可立即领取" + gameData.gBoxMoney + "元现金";
},
initEvent: function() {
var e = this;
this.btn_toInstall.quickBt(function() {
e.downLoad();
});
this.btn_toOpen.quickBt(function() {
gWordMgr.showTip("登录《来玩小游戏》并注册后，再提现");
});
this.btn_close.quickBt(function() {
e.node.active = !1;
});
this.btn_tixian.quickBt(function() {
pageData.msgGetBoxMoney(function() {
G_NODE.HALL.uiGameBoxCom = null;
UICtrl.closeUI(e);
});
});
},
downLoad: function() {
var e = this;
this.switchBtnState(n.TO_DOWNLOADING);
nativeData.InstallAPP(pageData.getBoxURL(), function(t) {
e.img_process.getComponent(cc.Sprite).fillRange = t / 100;
e.lbl_process.getComponent(cc.Label).string = t + "%";
}, function(e) {
webData.msgSendBoxUserInfo();
}, function() {
e.switchBtnState(n.TO_INSTALL);
});
},
checkInstallBox: function() {
console.log("[盒子]判断是否安装");
if (nativeData.checkAppInstalled("com.lwhy.lwxyx")) {
console.log("[盒子]安装了");
this.checkRegisterBox();
} else {
console.log("[盒子]没安装");
this.switchBtnState(n.TO_INSTALL);
}
},
checkRegisterBox: function() {
var e = this;
console.log("[盒子]是否注册了");
webData.msgGetBoxUserInfo(function() {
if (2 == gameData.gBoxUser) {
console.log("[盒子]注册了");
e.switchBtnState(n.TO_WITHDRAWAL);
} else {
console.log("[盒子]没注册");
e.switchBtnState(n.TO_OPEN);
}
});
},
switchBtnState: function(e) {
this.btn_toInstall.active = !1;
this.btn_toOpen.active = !1;
this.btn_downloading.active = !1;
this.btn_tixian.active = !1;
e == n.TO_INSTALL ? this.btn_toInstall.active = !0 : e == n.TO_OPEN ? this.btn_toOpen.active = !0 : e == n.TO_DOWNLOADING ? this.btn_downloading.active = !0 : e == n.TO_WITHDRAWAL && (this.btn_tixian.active = !0);
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiGameQuickBuild: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "b5725KbBFNGyLchAV+/Q8vJ", "uiGameQuickBuild");
cc.Class({
extends: ui.baseLayer,
properties: {},
start: function() {
this.initData();
this.initEvent();
this.initSchedule();
G_NODE.QUICK_TOWER = this;
},
initData: function() {
this._towerLimit = configCsvData.cFreeTower;
this._towerBuyID = 1;
this.towerNumCom = this.lbl_quick_process.getComponent(cc.Label);
console.log("TODO-uiGameQuickBuild-initData()");
this._towerRecover = 5;
console.log("TODO-uiGameQuickBuild-initData()_towerLimit=" + this._towerLimit + " _towerBuyID=" + this._towerBuyID);
},
initPower: function() {
console.log("TODO-uiGameQuickBuild-initPower()1gQuickPowerTime=" + gameData.gQuickPowerTime + " gQuickPower=" + gameData.gQuickPower);
if (gameData.gQuickPowerTime && !(gameData.gQuickPower >= this._towerLimit)) {
var e = new Date().getTime(), t = Math.floor((e - gameData.gQuickPowerTime) / 1e3);
gameData.set("gQuickPowerTime", e);
console.log("[上线补充炮塔]时间", t);
if (!(t <= 0)) {
var i = Math.floor(t / this._towerRecover);
console.log("[上线补充炮塔]补充个数", i);
gameData.plus("gQuickPower", i);
gameData.gQuickPower > this._towerLimit && gameData.set("gQuickPower", this._towerLimit);
}
}
console.log("TODO-uiGameQuickBuild-initPower()2gQuickPowerTime=" + gameData.gQuickPowerTime + " gQuickPower=" + gameData.gQuickPower);
},
changeBuildTower: function() {
var e = towerCsvData.getBuildTower(gameData.gMaxTower), t = towerCsvData.getAttacIconByID(e);
util.display(this.img_quick_tower, t);
this.lbl_quick_level.getComponent(cc.Label).string = e;
this._towerBuyID = e;
console.log("TODO-uiGameQuickBuild-changeBuildTower()gMaxTower=" + gameData.gMaxTower + " e=" + e);
},
initEvent: function() {
var e = this;
this.img_quick_tower.quickBt(function() {
console.log("TODO-uiGameQuickBuild-initEvent()img_quick_tower");
e.quickBuyTower();
});
gameData.on("gQuickPower", function() {
console.log("TODO-uiGameQuickBuild-initEvent()gQuickPower");
e.towerNumCom.string = gameData.get("gQuickPower") + "/" + e._towerLimit;
});
gameData.on("gMaxTower", function() {
console.log("TODO-uiGameQuickBuild-initEvent()gMaxTower");
e.changeBuildTower();
e.changeRecoverNumber();
});
},
changeRecoverNumber: function() {
console.log("TODO-uiGameQuickBuild-changeRecoverNumber()1", this._towerRecover);
this._towerRecover = towerCsvData.getCDTime(gameData.gMaxTower);
console.log("TODO-uiGameQuickBuild-changeRecoverNumber()2", this._towerRecover);
this._towerRecover = 1;
},
quickBuyTower: function() {
console.log("TODO-uiGameQuickBuild-quickBuyTower()");
if (gameData.get("gQuickPower") <= 0) this.openSupplyWindow(); else {
G_FRAME.IS_NEWUSER && 1 == this._towerBuyID && gGuideMgr.runStep();
var e = gTowerMgr.getEmptyOrder();
if (-1 != e) {
gameData.plus("gQuickPower", -1);
gameData.plus("gDayBuyTower", 1);
G_FRAME.IS_NEWUSER || gameData.gDayBuyTower != gFreeLotteryMgr.cFreeLotterForceTime || this.scheduleOnce(function() {
gFreeLotteryMgr.forceOpenLottery();
}, 1);
gTowerMgr.createTowerInPos(this._towerBuyID, G_POS.P_FREE, e);
this.changeBuildTower();
gGuideMgr.runStepBuyTowerGuide();
this.getExtraTower();
} else gWordMgr.showTip("位置满了,请合成或者拖动到道路回收");
}
},
getExtraTower: function() {
console.log("TODO-uiGameQuickBuild-getExtraTower()");
if (!(gameData.gMaxTower < gCloundMgr.cDropDoubleLevelLimit || gameData.gDayDropDoubleTower >= gCloundMgr.cDropDoubleTowerMax)) {
var e = new Date().getTime();
if (gameData.gDropDoubleTowerTime && e - gameData.gDropDoubleTowerTime <= 1e3 * gCloundMgr.cDropDoubleTowerCD) console.log("额外赠送炮塔CD中"); else {
var t = util.randomRange(1, 100), i = gCloundMgr.cDropDoubleTowerRate[gameData.gDropDoubleTowerIndex];
gameData.plus("gDropDoubleTowerIndex", 1);
console.log("【购买炮塔】", t, i, gameData.gDropDoubleTowerIndex);
if (t <= i) {
UICtrl.openUI("uiWindows/uiWindowBuyTip");
gameData.set("gDropDoubleTowerIndex", 0);
gameData.plus("gDayDropDoubleTower", 1);
gameData.set("gDropDoubleTowerTime", e);
}
}
}
},
initSchedule: function() {
console.log("TODO-uiGameQuickBuild-initSchedule()");
var e = this;
this.fillPercent = 0;
this.schedule(function() {
if (gameData.get("gQuickPower") < e._towerLimit) {
if (e.fillPercent >= 1) {
e.fillPercent = 0;
gameData.plus("gQuickPower", 1);
gameData.plus("gPowerAuto", 1);
gameData.set("gQuickPowerTime", new Date().getTime());
e.showPlus();
e.img_quick_ani.y = 20;
return;
}
e.fillPercent += .1 / e._towerRecover;
e.img_quick_ani.y = 120 * e.fillPercent - 100;
} else if (gameData.get("gQuickPower") >= e._towerLimit) {
e.img_quick_ani.y = 20;
e.fillPercent = 0;
}
}, .1);
},
openSupplyWindow: function() {
console.log("TODO-uiGameQuickBuild-openSupplyWindow()gameData.gDaySupplyCount=" + gameData.gDaySupplyCount + " gCloundMgr.cDaySupplyMax=" + gCloundMgr.cDaySupplyMax);
var e = this;
gameData.gDaySupplyCount >= gCloundMgr.cDaySupplyMax ? gWordMgr.showTip("达到每日补给次数上限，请明天再试") : UICtrl.openUI("uiCommon/uiCommonSupply", function(t) {
t.initSupply(function(t) {
e.fullPoolOneTime(t);
});
});
},
fullPoolOneTime: function(e) {
console.log("TODO-uiGameQuickBuild-fullPoolOneTime()e=" + e);
this.fillPercent = 0;
this.img_quick_ani.y = 20;
gameData.plus("gQuickPower", e);
gameData.plus("gPowerVideo", e);
},
showPlus: function(e) {
console.log("TODO-uiGameQuickBuild-showPlus()");
var t = e || 1;
this.lbl_quick_plus.getComponent(cc.Label).string = "+" + t;
this.lbl_quick_plus.opacity = 255;
this.lbl_quick_plus.runAction(cc.fadeTo(3, 0));
},
getCurrBuyTowerID: function() {
console.log("TODO-uiGameQuickBuild-getCurrBuyTowerID()_towerBuyID=" + this._towerBuyID);
return this._towerBuyID;
}
});
cc._RF.pop();
}, {} ],
uiGameTowerInfo: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "9b232WjsjlHyJA9EiwG47WN", "uiGameTowerInfo");
cc.Class({
extends: ui.baseLayer,
properties: {},
start: function() {},
setInfo: function(e) {
var t = towerCsvData.getPowerPerSceond(e), i = towerCsvData.getAttackNameByID(e), n = towerCsvData.getAttackSpedSecondByID(e), o = "伤害：" + t.toBitString() + "/每秒", a = e + "级", s = "攻速：" + n + "/每秒";
this.lbl_info_level.getComponent(cc.Label).string = a;
this.lbl_info_pow.getComponent(cc.Label).string = o;
this.lbl_info_spd.getComponent(cc.Label).string = s;
this.lbl_info_name.getComponent(cc.Label).string = i;
}
});
cc._RF.pop();
}, {} ],
uiGame: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "23f067GrsdK5pDOL+4W6hTp", "uiGame");
cc.Class({
extends: ui.baseLayer,
properties: {},
onLoad: function() {
this.resizeHall();
G_NODE.HALL = this;
gBulletMgr.init();
gMapMgr.init(this.tile_map);
gMonsterMgr.init();
gTowerMgr.init();
gWordMgr.init();
},
resizeHall: function() {
this.node.setContentSize(720, G_COM.G_HEIGHT);
console.log("[刘海屏适配]", G_COM.G_HEIGHT);
G_COM.G_HEIGHT > 1300 ? this.node_top.y = G_COM.G_HEIGHT - 35 : this.node_top.y = G_COM.G_HEIGHT;
},
start: function() {
this.initGlobalPos();
this.initEvent();
this.setIOSHideUI();
},
setIOSHideUI: function() {
if (cc.sys.os == cc.sys.OS_IOS && gCloundMgr.cIOSHide) {
this.img_dividend_banner.active = !1;
this.img_gameBox.active = !1;
this.img_new_money.active = !1;
this.img_level_money.active = !1;
this.btn_lottery.active = !1;
this.img_tixian_red.active = !1;
this.img_money_banner.canTouch = !1;
this.img_friendGroup.active = !1;
this.btn_shop.active = !1;
this.flag_invite.active = !1;
this.lbl_invite.active = !1;
}
},
loginDataBack: function() {
this.initChapter();
this.initUI();
gWealthMgr.init();
gMainMgr.init();
G_NODE.QUICK_TOWER && G_NODE.QUICK_TOWER.initPower();
G_NODE.TIME_MONEY && G_NODE.TIME_MONEY.initTime();
this.updateMoreGameIcon();
this.img_gameBox.getComponent("nodeBtnGameBox").showGameBox();
this.btn_turntable.getComponent("nodeBtnTurntable").initShow();
gFreeLotteryMgr.showLotteryBtn();
gTurntableMgr.showTurntableBtn();
pageData.msgInitLotteryConfig();
gMainMgr.getRandomShareImage();
},
initGlobalPos: function() {
var e = this;
this.scheduleOnce(function() {
G_POS.P_MONEY_GLOBAL = util.convetOtherNodeSpaceAR(e.img_logo_red, cc.Canvas.instance.node);
G_POS.P_MONEY = util.convetOtherNodeSpaceAR(e.img_logo_red, e.layer_tower);
G_POS.P_FREE = util.convetOtherNodeSpaceAR(e.lbl_quick_process, e.layer_tower);
G_POS.P_FREE_GLOBAL = util.convetOtherNodeSpaceAR(e.img_quick_tower, cc.Canvas.instance.node);
G_POS.P_FRIEND_GROUP_GLOBAL = util.convetOtherNodeSpaceAR(e.img_friendGroup, cc.Canvas.instance.node);
G_POS.P_TURNTABLE = util.convetOtherNodeSpaceAR(e.btn_turntable, cc.Canvas.instance.node);
}, .2);
},
initChapter: function() {
this.hideCrystal();
this.initGameUI();
this.clearLyer();
this.layer_cover.active = !0;
if (G_COM.FIRST_ENTER) {
gTowerMgr.createLastLoginTower();
gTowerMgr.createLastDropMoney();
gTowerMgr.initMainTower();
}
this.createMonster();
this.beginGuide();
G_COM.FIRST_ENTER = !1;
},
initUI: function() {
this.updateMoneyUI(0);
this.updateMyHead();
this.updateDivdend();
},
updateMoneyUI: function(e, t, i) {
if (void 0 != e) {
e = Math.floor(e);
gameData.plus("gMoney", e);
this.lbl_money.getComponent(cc.Label).setNum(gameData.gMoney);
}
if (t) {
var n = cc.scaleTo(.1, 1.5), o = cc.scaleTo(.1, 1);
this.img_logo_red.runAction(cc.sequence(n, o));
}
i && gWordMgr.createFlowGold(e, i);
},
clearLyer: function() {
this.layer_bullet.destroyAllChildren();
this.layer_world.destroyAllChildren();
this.layer_monster.destroyAllChildren();
this.layer_ghost.destroyAllChildren();
gMonsterMgr.clear();
},
initGameUI: function() {
var e = stageCsvData.getChapterName();
this.lbl_chapter.getComponent(cc.Label).string = e;
},
gameFail: function() {
gTowerMgr.touchAllCancel();
var e = stageCsvData.getLastChapterID();
gameData.set("gChapter", e);
gWealthMgr.sendChapterMoney();
this.scheduleOnce(function() {
gMainMgr.enterNextChapter();
}, 1);
this.playCricleDeath();
},
gameSucs: function() {
gTowerMgr.touchAllCancel();
stageCsvData.getIsBossChapter();
var e = stageCsvData.getNextChapterID();
gameData.set("gChapter", e);
gWealthMgr.sendChapterMoney();
this.scheduleOnce(function() {
gMainMgr.enterNextChapter();
(!gameData.get("maxGameChapter") || gameData.get("maxGameChapter") <= e) && gameData.set("maxGameChapter", e);
}, 1);
},
initEvent: function() {
var e = this;
this.btn_roller.quickBt(function() {
console.log("TODO-uiGame-initEvent()btn_roller");
UICtrl.openUI("uiRoller/uiRoller");
});
this.img_setting_head.quickBt(function() {
console.log("TODO-uiGame-initEvent()img_setting_head");
UICtrl.openUI("uiSetting/uiSetting");
});
this.img_level_money.quickBt(function() {
console.log("TODO-uiGame-initEvent()img_level_money");
UICtrl.openUI("uiLevelRed/uiLevelRed");
});
this.btn_sign.quickBt(function() {
console.log("TODO-uiGame-initEvent()btn_sign");
UICtrl.openUI("uiSign/uiSign");
});
this.btn_task.quickBt(function() {
console.log("TODO-uiGame-initEvent()btn_task");
UICtrl.openUI("uiTask/uiTask");
});
this.img_new_money.quickBt(function() {
console.log("TODO-uiGame-initEvent()img_new_money");
UICtrl.openUI("uiNewMoney/uiNewMoney");
});
this.img_tixian_red.quickBt(function() {
console.log("TODO-uiGame-initEvent()img_tixian_red");
UICtrl.openUI("uiWithdrawal/uiWallet");
});
this.img_money_banner.quickBt(function() {
console.log("TODO-uiGame-initEvent()img_money_banner");
UICtrl.openUI("uiWithdrawal/uiWallet");
}, !0);
this.img_tixian_dividend.quickBt(function() {
console.log("TODO-uiGame-initEvent()img_tixian_dividend");
UICtrl.openUI("uiDividend/uiDividend");
});
this.img_dividend_banner.quickBt(function() {
console.log("TODO-uiGame-initEvent()img_dividend_banner");
UICtrl.openUI("uiDividend/uiDividend");
}, !0);
this.btn_shop.quickBt(function() {
console.log("TODO1-uiGame-initEvent()btn_shop");//点击图鉴
shareData.getShareUrl(function(t) {});// 累计分享3次
shareData.beginRotation2();//转盘抽奖10次
gameData.set("gDayTimeMoney", "12345|11");// 限时红包领取5次
gameData.plus("gDayCombineTime", 20);// 合成炮塔20次

// 视频补充炮塔2次
gameData.plus("gDaySupplyCount", 2);
gameData.plus("gQuickPower", 40);
gameData.plus("gPowerVideo", 40);
//LWADSDK.showDemo();
//UICtrl.openUI("uiShop/uiShop");
});
this.img_active_withdrawal.quickBt(function() {
console.log("TODO-uiGame-initEvent()img_active_withdrawal");
UICtrl.openUI("uiActiveWithdrawal/uiActiveWithdrawal");
});
this.img_gameBox.quickBt(function() {
console.log("TODO-uiGame-initEvent()img_gameBox");
e.openGameBox();
});
this.img_chouti.quickBt(function() {
console.log("TODO-uiGame-initEvent()img_chouti");
e._uiOtherGame ? e._uiOtherGame.initUI() : UICtrl.openUI("uiMoreGame/uiMoreGame", function(t) {
e._uiOtherGame = t.getComponent("uiMoreGame");
});
});
this.btn_invite.quickBt(function() {
console.log("TODO-uiGame-initEvent()btn_invite");
gFriendGroupMgr.openView();
});
this.img_friendGroup.quickBt(function() {
console.log("TODO-uiGame-initEvent()img_friendGroup");
gFriendGroupMgr.openView();
});
gFreeLotteryMgr.initEvent(this.btn_lottery);
gTurntableMgr.initEvent(this.btn_turntable);
},
openGameBox: function() {
var e = this;
this.uiGameBoxCom ? this.uiGameBoxCom.initUI() : UICtrl.openUI("uiGameBox/uiGameBox", function(t) {
e.uiGameBoxCom = t.getComponent("uiGameBox");
});
},
createMonster: function() {
this.initCrystal();
gMonsterMgr.touchCreateMonster();
},
beginGuide: function() {
var e = this;
G_FRAME.IS_NEWUSER && 1011 == gameData.gChapter ? this.scheduleOnce(function() {
gGuideMgr.runGuide();
e.layer_cover.active = !1;
}, 1) : this.layer_cover.active = !1;
},
playGameUIInstand: function() {
var e = cc.moveBy(.5, cc.v2(0, -320)), t = cc.moveBy(.5, cc.v2(0, 320)), i = cc.moveBy(.5, cc.v2(0, -320)), n = cc.moveBy(.5, cc.v2(0, 320)), o = cc.delayTime(1);
this.node_btm.runAction(cc.sequence(e, o, t));
this.node_top.runAction(cc.sequence(n, o, i));
},
showShopDel: function() {},
hideShopDel: function() {},
showTowerInfo: function(e, t) {
-1 == t ? G_POS.P_MAIN_TOWER.add(cc.v2(0, -250)) : G_COM.PATH_LIST[t].add(cc.v2(0, 50));
},
hideTowerInfo: function() {
this.node_tower_info.active = !1;
},
initCrystal: function() {
this.img_end_door.active = !0;
var e = gMapMgr.getCrystalPos();
this.img_end_door.position = e;
this.img_end_door.getComponent(dragonBones.ArmatureDisplay).playAnimation("idle");
},
hideCrystal: function() {
this.img_end_door.active = !1;
},
showBossWarn: function(e) {
UICtrl.createUI("prefab/uiObjects/uiBossWarn", function(t) {
t.parent = G_NODE.WINDOW;
t.getComponent("uiBossWarn").init(e);
});
},
updateMyHead: function() {
var e = this;
gameData.headWeb && "" != gameData.headWeb && cc.loader.load({
url: gameData.headWeb,
type: "png"
}, function(t, i) {
t && console.error(t);
e.img_setting_head.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(i);
e.img_setting_head.width = 80;
e.img_setting_head.height = 80;
});
gameData.on("gPlayerLevel", function(t) {
e.lbl_player_level.getComponent(cc.Label).string = "L" + t;
}, this.node);
gameData.on("gPlayerExp", function(t) {
var i = levelExpCsvData.getExp(gameData.gPlayerLevel);
e.img_player_exp.getComponent(cc.Sprite).fillRange = t / i;
}, this.node);
},
updateDivdend: function() {
var e = this;
pageData.msgGetDailyShare(function(t) {
e.lbl_dividend.getComponent(cc.Label).string = t.onesy / 100;
});
},
playCricleDeath: function() {
this.img_end_door.getComponent(dragonBones.ArmatureDisplay).playAnimation("dead", 1);
},
updateMoreGameIcon: function() {
gameData.gMaxTower >= gCloundMgr.cOpenMoreGame ? this.img_chouti.active = !0 : this.img_chouti.active = !1;
gameData.gMaxTower >= gCloundMgr.cShowGameBoxLevel && this.img_gameBox.getComponent("nodeBtnGameBox").showGameBox();
}
});
cc._RF.pop();
}, {} ],
uiGuideArraw: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "48d706VOVdJKL0IHpBJWhXE", "uiGuideArraw");
cc.Class({
extends: cc.Component,
properties: {},
start: function() {
var e = cc.moveBy(.5, cc.v2(0, -100)), t = cc.moveBy(.5, cc.v2(0, 100)), i = cc.sequence(e, t), n = cc.repeatForever(i);
this.node.runAction(n);
var o = cc.delayTime(3), a = cc.removeSelf();
this.node.runAction(cc.sequence(o, a));
}
});
cc._RF.pop();
}, {} ],
uiGuideFinger: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "7712d/QwIdLM4qztG9QiILa", "uiGuideFinger");
cc.Class({
extends: cc.Component,
properties: {},
start: function() {},
showGuideFinger: function(e, t) {
var i = this, n = gTowerMgr.getTowerPos(e);
n.subSelf(cc.v2(-40, 40));
this.node.position = n;
var o = gTowerMgr.getTowerPos(t);
o.subSelf(cc.v2(-40, 40));
var a = cc.callFunc(function() {
i.getComponent(cc.Animation).play();
}), s = cc.delayTime(.6), r = cc.moveTo(1.4, o), c = cc.callFunc(function() {
i.node.position = n;
}), l = cc.sequence(a, s, r, c);
this.node.runAction(cc.repeatForever(l));
}
});
cc._RF.pop();
}, {} ],
uiGuideLayer: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "9c1a8e16/VLmJPEEtiXN4Z/", "uiGuideLayer");
cc.Class({
extends: ui.baseLayer,
properties: {},
start: function() {
this.img_touch.quickBt(function() {
gGuideMgr.runStep();
});
},
showStep: function(e) {
this.node.active = !0;
gMainMgr.stopGame();
var t = e.maskPos || cc.v2(0, 400), i = e.maskSize, n = e.hideAll || !1, o = e.hideFinger || !1, a = e.hideArraw || !1, s = e.touchNext || !1, r = e.guideWord || 0, c = e.guideWordPos || 0, l = e.guideFingerOffset || 0, u = e.finger || 1;
this.node_move.position = t;
this.mask_guide.setContentSize(i.width, i.height);
this.img_touch.active = !!s;
if (r) {
this.node_word.active = !0;
var h = "image/uiGuide/di" + r;
util.display(this.img_guide_word, h);
c && (this.node_word.y = c);
} else this.node_word.active = !1;
if (n) this.art_finger.active = !1; else {
this.art_finger.active = !0;
var d = this.art_finger.getComponent(cc.Animation), g = d.getClips();
if (1 == u) {
this.art_finger.x = l;
d.play(g[0].name);
this.img_arraw.active = !0;
} else {
this.art_finger.x = -80;
d.play(g[1].name);
this.img_arraw.active = !1;
}
this.img_arraw.active = !a;
this.img_finger.active = !o;
}
},
onTouchBg: function(e) {
this.node._touchListener.setSwallowTouches(!0);
},
onDisable: function() {
gMainMgr.resumeGame();
}
});
cc._RF.pop();
}, {} ],
uiGuideTip: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "475feS3MyFEgaoZb7TzERp4", "uiGuideTip");
cc.Class({
extends: ui.baseLayer,
properties: {
_touchTimes: 0,
_touchMax: 0
},
initTimes: function(e) {
this._touchMax = e;
},
doTouchThisNode: function() {
this._touchTimes++;
if (this._touchTimes >= this._touchMax) {
this.node.destroy();
gameData.gNoOperaTime = 0;
}
}
});
cc._RF.pop();
}, {} ],
uiHall: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "8d7312fEyFOp54I8F88Lv5c", "uiHall");
cc.Class({
extends: ui.baseLayer,
properties: {},
start: function() {
this.initLog();
this.initNode();
this.resizeHall();
this.getWebData();
this.initExtChannel();
},
initLog: function() {
webData.msgSendRecore(G_WINDOW_FROM.HALL);
},
initNode: function() {
G_NODE.WINDOW = this.node_windows;
G_NODE.GUIDE = this.node_guide;
G_NODE.NOTICE = this.node_notice;
G_NODE.MAIN_GUIDE = cc.find("LayerGuide", cc.Canvas.instance.node);
},
resizeHall: function() {
var e = cc.Canvas.instance.node.getContentSize();
this.node.setContentSize(e);
this.node_game_view.setContentSize(e);
this.node_cover.setContentSize(e);
this.node_cover.y = e.height / 2;
this.node_windows.y = e.height / 2;
this.lbl_version.getComponent(cc.Label).string = "版本号:" + G_FRAME.VERSION;
},
getWebData: function() {
var e = this;
this.node_cover.active = !0;
UICtrl.createUI("prefab/uiGame/uiGame", function(t) {
if (cc.isValid(e.node_game)) {
t.parent = e.node_game;
e.uiGame = t.getComponent("uiGame");
}
});
if (cc.sys.os == cc.sys.OS_IOS) webData.msgLogin(function() {
e.loading_process.getComponent("nodeLoading").init(function() {
webData.msgGetChannelVideo(function() {
e.node_cover.removeFromParent();
cc.find("img_bg", cc.Canvas.instance.node).removeFromParent();
cc.find("lbl_notice", cc.Canvas.instance.node).removeFromParent();
e.loginDataBack();
});
});
}); else {
webData.msgGetChannelVideo();
this.loading_process.getComponent("nodeLoading").init(function() {
webData.msgLogin(function() {
e.node_cover.removeFromParent();
cc.find("img_bg", cc.Canvas.instance.node).removeFromParent();
cc.find("lbl_notice", cc.Canvas.instance.node).removeFromParent();
e.loginDataBack();
});
});
}
},
loginDataBack: function() {
var e = this;
this.uiGame ? this.uiGame.loginDataBack() : this.scheduleOnce(function() {
e.uiGame.loginDataBack();
}, 1.5);
shareData.init();
audioData.switchMainZone();
gWindowMgr.forceOpenWindow();
},
initExtChannel: function() {
5 == nativeData.getChannelCode() && (this.lbl_notice.active = !1);
}
});
cc._RF.pop();
}, {} ],
uiHotUpdate: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "a6fdeFf+JNKN6n81zSgPU0z", "uiHotUpdate");
e("init");
cc.Class({
extends: cc.Component,
properties: {
manifestUrl: {
type: cc.Asset,
default: null
},
_updating: !1,
_canRetry: !1,
_storagePath: "",
_finishCallback: void 0,
_hasFinish: !1,
_maxRestyTime: 3
},
onUpdateFinish: function(e) {
cc.sys.isNative && !this._hasFinish ? this._finishCallback = e : e && e();
},
onUpdate: function(e) {},
toHotUpdate: function() {
if (cc.sys.isNative) {
console.log("HotUpdate:uiHotUpdate init 1.01");
var e = (jsb.fileUtils ? jsb.fileUtils.getWritablePath() : "/") + "blackjack-remote-asset";
this._storagePath = e;
this._tempStorePath = (jsb.fileUtils ? jsb.fileUtils.getWritablePath() : "/") + "blackjack-remote-asset_temp";
console.log("HotUpdate:Storage path for remote asset : " + e);
this.versionCompareHandle = function(e, t) {
console.log("HotUpdate:JS Custom Version Compare: version A is " + e + ", version B is " + t);
for (var i = e.split("."), n = t.split("."), o = 0; o < i.length; ++o) {
var a = parseInt(i[o]), s = parseInt(n[o] || 0);
if (a !== s) return a - s;
}
return n.length > i.length ? -1 : 0;
};
this._am = new jsb.AssetsManager("", this._storagePath, this.versionCompareHandle);
this._am.setVerifyCallback(function(e, t) {
var i = t.compressed, n = t.md5, o = t.path;
t.size;
if (i) {
console.log("HotUpdate:Verification passed : " + o);
return !0;
}
console.log("HotUpdate:Verification passed : " + o + " (" + n + ")");
return !0;
});
console.log("HotUpdate:Hot update is ready, please check or directly update.");
if (cc.sys.os === cc.sys.OS_ANDROID) {
this._am.setMaxConcurrentTask(6);
console.log("HotUpdate:Max concurrent tasks count have been limited to 6");
}
this._setByteProgress(0);
this.checkUpdate();
}
},
_setByteProgress: function(e) {
this.onUpdate(e);
},
checkCb: function(e) {
console.log("HotUpdate:checkCb Code: " + e.getEventCode());
var t = !1, i = !1;
switch (e.getEventCode()) {
case jsb.EventAssetsManager.ERROR_NO_LOCAL_MANIFEST:
console.log("HotUpdate:No local manifest file found, hot update skipped.");
t = !0;
break;

case jsb.EventAssetsManager.ERROR_DOWNLOAD_MANIFEST:
console.log("HotUpdate:ERROR_DOWNLOAD_MANIFEST.");
t = !0;
break;

case jsb.EventAssetsManager.ERROR_PARSE_MANIFEST:
console.log("HotUpdate:Fail to download manifest file, hot update skipped");
t = !0;
break;

case jsb.EventAssetsManager.ALREADY_UP_TO_DATE:
console.log("HotUpdate:Already up to date with the latest remote version.");
t = !0;
break;

case jsb.EventAssetsManager.NEW_VERSION_FOUND:
console.log("HotUpdate:New version found, please try to update.");
this._setByteProgress(0);
i = !0;
break;

default:
return;
}
this._am.setEventCallback(null);
this._checkListener = null;
this._updating = !1;
if (t) {
this._hasFinish = !0;
this._finishCallback && this._finishCallback();
} else i && this.hotUpdate();
},
updateCb: function(e) {
var t = !1, i = !1;
switch (e.getEventCode()) {
case jsb.EventAssetsManager.ERROR_NO_LOCAL_MANIFEST:
console.log("HotUpdate:No local manifest file found, hot update skipped.");
i = !0;
break;

case jsb.EventAssetsManager.UPDATE_PROGRESSION:
var n = e.getDownloadedBytes();
if (this.totalBytes > 0) {
var o = n / this.totalBytes;
o = parseInt(100 * o);
console.log("HotUpdate:percent" + o + "," + n + "," + this.totalBytes);
this._setByteProgress(o);
} else {
this.totalBytes = e.getTotalBytes();
if (0 == this.totalBytes) this._setByteProgress(0); else {
var a = n / this.totalBytes;
a = parseInt(100 * a);
console.log("HotUpdate:percent" + a + "," + n + "," + this.totalBytes);
this._setByteProgress(a);
}
}
var s = e.getMessage();
s && console.log("HotUpdate:file" + s);
break;

case jsb.EventAssetsManager.ERROR_DOWNLOAD_MANIFEST:
case jsb.EventAssetsManager.ERROR_PARSE_MANIFEST:
console.log("HotUpdate:Fail to download manifest file, hot update skipped.");
i = !0;
break;

case jsb.EventAssetsManager.ALREADY_UP_TO_DATE:
console.log("HotUpdate:Already up to date with the latest remote version.");
i = !0;
break;

case jsb.EventAssetsManager.UPDATE_FINISHED:
console.log("HotUpdate:Update finished. " + e.getMessage());
t = !0;
break;

case jsb.EventAssetsManager.UPDATE_FAILED:
console.log("HotUpdate:Update failed2. " + e.getMessage());
this._updating = !1;
this._canRetry = !0;
break;

case jsb.EventAssetsManager.ERROR_UPDATING:
console.log("HotUpdate:Asset update error: " + e.getAssetId() + ", " + e.getMessage());
break;

case jsb.EventAssetsManager.ERROR_DECOMPRESS:
console.log("HotUpdate:" + e.getMessage());
}
this._canRetry && this.retry();
if (i) {
this._am.setEventCallback(null);
this._updateListener = null;
this._updating = !1;
this._hasFinish = !0;
this._finishCallback && this._finishCallback();
}
if (t) {
this._am.setEventCallback(null);
this._updateListener = null;
var r = jsb.fileUtils.getSearchPaths(), c = this._am.getLocalManifest().getSearchPaths();
console.log("HotUpdate:" + JSON.stringify(c));
Array.prototype.unshift.apply(r, c);
cc.sys.localStorage.setItem("HotUpdateSearchPaths", JSON.stringify(r));
cc.audioEngine.stopAll();
cc.game.restart();
}
},
retry: function() {
if (!this._updating && this._canRetry) {
this._maxRestyTime--;
this._canRetry = !1;
if (this._maxRestyTime <= 0) {
this.deleteCatchAndRestart(!0);
return;
}
console.log("HotUpdate:Retry failed Assets...");
this._am.downloadFailedAssets();
}
},
deleteCatchAndRestart: function(e) {
if (cc.sys.localStorage.getItem("HotUpdateSearchPaths") || e) {
cc.sys.localStorage.removeItem("HotUpdateSearchPaths");
var t = this._am.getStoragePath();
jsb.fileUtils.removeDirectory(t);
jsb.fileUtils.removeDirectory(this._tempStorePath);
console.log("HotUpdate:清除热更新缓存" + t);
console.log("HotUpdate:清除热更新TEMP缓存" + this._tempStorePath);
cc.audioEngine.stopAll();
cc.game.restart();
return !0;
}
return !1;
},
deleteCatch: function() {
if (nativeData.firstCoverInstall) {
console.log("HotUpdate:覆盖后第一次安装清楚缓存");
return this.deleteCatchAndRestart();
}
return !1;
},
checkUpdate: function() {
if (this._updating) console.log("HotUpdate:Checking or updating ..."); else {
if (this._am.getState() === jsb.AssetsManager.State.UNINITED) {
var e = this.manifestUrl.nativeUrl;
cc.loader.md5Pipe && (e = cc.loader.md5Pipe.transformURL(e));
this._am.loadLocalManifest(e);
}
if (this._am.getLocalManifest() && this._am.getLocalManifest().isLoaded()) {
var t = this._am.getLocalManifest().getVersion();
G_FRAME.VERSION = t;
if (!this.deleteCatch()) {
console.log("HotUpdate:version:" + t);
this._am.setEventCallback(this.checkCb.bind(this));
this._am.checkUpdate();
this._updating = !0;
}
} else console.log("HotUpdate:Failed to load local manifest ...");
}
},
hotUpdate: function() {
if (this._am && !this._updating) {
this._am.setEventCallback(this.updateCb.bind(this));
if (this._am.getState() === jsb.AssetsManager.State.UNINITED) {
var e = this.manifestUrl.nativeUrl;
cc.loader.md5Pipe && (e = cc.loader.md5Pipe.transformURL(e));
this._am.loadLocalManifest(e);
}
this._failCount = 0;
this._am.update();
this._updating = !0;
}
},
show: function() {},
onDestroy: function() {
if (this._updateListener) {
this._am.setEventCallback(null);
this._updateListener = null;
}
}
});
cc._RF.pop();
}, {
init: "init"
} ],
uiInteraction: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "e30edZlV8tKGpcr3CeODLSa", "uiInteraction");
cc.Class({
extends: e("uiBaseLwAd"),
properties: {
_sucCallback: null,
_failCallback: null,
_bFinish: !1,
_bVideoReady: !1
},
onInit: function() {}
});
cc._RF.pop();
}, {
uiBaseLwAd: "uiBaseLwAd"
} ],
uiInvite: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "c27efRFfCNLwZiYKx+rRGd6", "uiInvite");
cc.Class({
extends: e("uiWindowBase"),
properties: {},
start: function() {
var e = this;
this.btn_close.quickBt(function() {
UICtrl.closeUI(e);
});
this.btn_weixin.quickBt(function() {
shareData.toShareWX();
});
this.btn_friend.quickBt(function() {
shareData.toShareWXCricle();
});
this.btn_qq.quickBt(function() {
shareData.toShareQQ();
});
this.btn_zone.quickBt(function() {
shareData.toShareQQZone();
});
var t = nativeData.checkAppInstalled("com.tencent.mobileqq"), i = nativeData.checkAppInstalled("com.tencent.mm");
if (t || !i) if (!t || i) if (t || i) ; else {
this.node_wx.active = !1;
this.node_qq.active = !1;
} else {
this.node_wx.active = !0;
this.node_qq.active = !1;
} else {
this.node_wx.active = !1;
this.node_qq.active = !0;
}
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiLevelMoney: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "1786fXNpmJIDrbSuomg5cc8", "uiLevelMoney");
var n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
return typeof e;
} : function(e) {
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
};
cc.Class({
extends: e("uiWindowBase"),
properties: {},
start: function() {
this.initUI();
this.initEvent();
webData.msgSendRecore(G_WINDOW_FROM.LEVEL);
gameData.set("gOpenWithLevelWindow", !0);
},
initEvent: function() {
var e = this;
this.btn_close.quickBt(function() {
e.closeSelf();
});
},
closeSelf: function() {
this.closeToNode(G_NODE.HALL.img_level_money);
},
initUI: function() {
"object" != n(gameData.gLevelMoney) && (gameData.gLevelMoney = {});
var e = levelMoneyCsvData.getAllDatas(), t = this.layout_content.getChildren();
for (var i in e) {
var o = t[i - 1];
this.initItem(o, e[i]);
}
var a = 0, s = 0, r = 0;
if (gameData.gMaxTower > 15 && gameData.gMaxTower <= 35) {
a = (gameData.gMaxTower - 15) / 20;
s = 0;
r = 0;
} else if (gameData.gMaxTower > 35 && gameData.gMaxTower <= 50) {
a = 1;
s = (gameData.gMaxTower - 35) / 15;
r = 0;
} else if (gameData.gMaxTower > 50 && gameData.gMaxTower <= 72) {
a = 1;
s = 1;
r = (gameData.gMaxTower - 50) / 22;
}
this.img_process_1.getComponent(cc.Sprite).fillRange = a;
this.img_process_2.getComponent(cc.Sprite).fillRange = s;
this.img_process_3.getComponent(cc.Sprite).fillRange = r;
},
initItem: function(e, t) {
var i = t.id, n = t.level, o = t.reward_money;
e.lbl_level_left.getComponent(cc.Label).string = n;
e.lbl_level.getComponent(cc.Label).string = n;
if (4 == i) {
e.lbl_getReal.active = !0;
e.lbl_getMoney.active = !1;
e.lbl_money_logo.active = !1;
e.lbl_real_logo.active = !0;
var a = Math.floor(o / 1e4);
e.lbl_money.getComponent(cc.Label).string = a + "元";
} else {
e.lbl_getReal.active = !1;
e.lbl_getMoney.active = !0;
e.lbl_money_logo.active = !0;
e.lbl_real_logo.active = !1;
e.lbl_money.getComponent(cc.Label).string = "X" + o;
}
var s = towerCsvData.getAttacIconByID(n);
util.display(e.img_tower, s);
if (gameData.gMaxTower >= n) if (gameData.gLevelMoney[i]) {
e.btn_toGet.active = !1;
e.btn_hasGet.active = !0;
e.btn_unAchieve.active = !1;
} else {
e.btn_toGet.active = !0;
e.btn_hasGet.active = !1;
e.btn_unAchieve.active = !1;
} else {
e.btn_toGet.active = !1;
e.btn_hasGet.active = !1;
e.btn_unAchieve.active = !0;
}
if (4 == i) {
e.btn_toGet.active = !0;
e.btn_hasGet.active = !1;
e.btn_unAchieve.active = !1;
}
e.btn_toGet.quickBt(function() {
if (4 != i) UICtrl.openUI("uiCommon/uiCommonMoney", function(t) {
t.initNormal(G_MONEY_FROM.LEVEL, o, function() {
gameData.gLevelMoney[i] = !0;
gameData.save("gLevelMoney");
e.btn_toGet.active = !1;
e.btn_hasGet.active = !0;
e.btn_unAchieve.active = !1;
});
}); else {
var t = "解锁" + n + "级炮可领取288元现金";
gWordMgr.showTip(t);
}
});
},
onDestroy: function() {
gameData.send("moduleTipUpdate", G_WINDOW_FROM.LEVEL);
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiLevelRedSource: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "27c0aWgqTdObpE/BQK6Kofv", "uiLevelRedSource");
cc.Class({
extends: e("uiWindowBase"),
properties: {},
start: function() {
this.addEvents();
},
addEvents: function() {
var e = this;
this.btn_confirm.quickBt(function() {
UICtrl.closeUI(e);
});
this.btn_close.quickBt(function() {
UICtrl.closeUI(e);
});
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiLevelRed: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "bd84bg7jchNepN8aPP2Itqs", "uiLevelRed");
var n = {
1: {
iNeedLevel: 10,
reward: 800,
iRedType: 0,
iExp: 40
},
2: {
iNeedLevel: 20,
reward: 1800,
iRedType: 0,
iExp: 40
},
3: {
iNeedLevel: 30,
reward: 6800,
iRedType: 0,
iExp: 50
},
4: {
iNeedLevel: 68,
reward: 88,
iRedType: 1,
iExp: 2e3
},
5: {
iNeedLevel: 78,
reward: 100,
iRedType: 1,
iExp: 8e3
}
};
cc.Class({
extends: e("uiWindowBase"),
properties: {},
start: function() {
webData.msgSendRecore(G_WINDOW_FROM.LEVEL);
this.completeIndex = 0;
this.addEvents();
this.initView();
this._lastAwardLevel = gameData.get("gLevelRedAward");
this.refreshView(!0);
GM.lastLevel = gameData.get("gPlayerLevel");
GM.lastLevel || (GM.lastLevel = 1);
GM.lastExp = gameData.get("gPlayerExp");
},
addEvents: function() {
var e = this;
this.btn_close.quickBt(function() {
e.closeSelf();
});
this.btn_how.quickBt(function() {
UICtrl.closeUI(e);
UICtrl.openUI("uiLevelRed/uiLevelRedSource");
});
},
closeSelf: function() {
this.closeToNode(G_NODE.HALL.img_level_money);
this.onFlyFriendGroup();
},
updateLevel: function(e) {
var t = gameData.get("gPlayerLevel"), i = gameData.get("gPlayerExp");
t || (t = 1);
if (e && void 0 != GM.lastLevel && void 0 != GM.lastExp) if (GM.lastLevel < t) {
var n = GM.lastLevel, o = GM.lastExp;
this.lbl_lv.setLabel(n);
this.lbl_lv_desc.setLabel("Lv." + n);
this.img_progress.getComponent(cc.Sprite).fillRange = o / levelExpCsvData.getExp(n);
this.lbl_progress.getComponent(cc.Label).string = o + "/" + levelExpCsvData.getExp(n);
this.schedule(function() {
if (!(this.img_lv.getNumberOfRunningActions() > 0)) {
var e = levelExpCsvData.getExp(n);
o += e / 60 / .4;
this.img_progress.getComponent(cc.Sprite).fillRange = o / e;
if (o >= e) {
n++;
o = 0;
this.img_lv.runAction(cc.sequence(cc.scaleTo(.15, 1.3, 1.3), cc.scaleTo(.15, .9, .9), cc.scaleTo(.1, 1, 1), cc.callFunc(function() {
this.lbl_lv.setLabel(n);
this.lbl_lv_desc.setLabel("Lv." + n);
}.bind(this))));
}
if (n >= t && o >= i) {
o = i;
this.img_progress.getComponent(cc.Sprite).fillRange = o / e;
this.lbl_progress.getComponent(cc.Label).string = o + "/" + e;
this.unscheduleAllCallbacks();
}
}
}.bind(this), 1 / 60, cc.macro.REPEAT_FOREVER, .6);
} else if (GM.lastLevel == t && GM.lastExp < i) {
var a = GM.lastLevel, s = .7 * GM.lastExp;
this.lbl_lv.setLabel(a);
this.lbl_lv_desc.setLabel("Lv." + a);
this.img_progress.getComponent(cc.Sprite).fillRange = s / levelExpCsvData.getExp(a);
this.lbl_progress.getComponent(cc.Label).string = s + "/" + levelExpCsvData.getExp(a);
this.schedule(function() {
var e = levelExpCsvData.getExp(a);
s += e / 60 / .4;
this.img_progress.getComponent(cc.Sprite).fillRange = s / e;
if (s >= i) {
s = i;
this.img_progress.getComponent(cc.Sprite).fillRange = s / e;
this.lbl_progress.getComponent(cc.Label).string = s + "/" + e;
this.unscheduleAllCallbacks();
}
}.bind(this), 1 / 60, cc.macro.REPEAT_FOREVER, .6);
} else this.updateGamelevelInfo(t, i); else this.updateGamelevelInfo(t, i);
},
updateGamelevelInfo: function(e, t) {
this.lbl_lv.setLabel(e);
this.lbl_lv_desc.setLabel("Lv." + e);
this.img_progress.getComponent(cc.Sprite).fillRange = t / levelExpCsvData.getExp(e);
this.lbl_progress.getComponent(cc.Label).string = t + "/" + levelExpCsvData.getExp(e);
},
refreshView: function(e) {
this.updateLevel(e);
var t = gameData.get("gPlayerLevel");
t || (t = 1);
for (var i = gameData.get("gLevelRedAward"), o = 1; o <= 3; o++) {
var a = this["node_item" + o], s = n[o].iNeedLevel;
if (i >= s) {
a.btn_award.active = !1;
a.btn_award_disable.active = !1;
a.btn_complete.active = !0;
this.completeIndex = o;
} else if (t >= s && o == this.completeIndex + 1) {
a.btn_award_disable.active = !1;
a.btn_award.active = !0;
a.btn_complete.active = !1;
} else {
a.btn_award_disable.active = !0;
a.btn_award.active = !1;
a.btn_complete.active = !1;
}
}
},
initView: function() {
var e = this;
util.setHead(this.img_head, this.node, gameData.headWeb, null);
for (var t = function(t) {
var i = e["node_item" + t], o = n[t].iNeedLevel, a = gCloundMgr.cGameLevelExpAward[t - 1], s = n[t].reward, r = n[t].iRedType;
util.setHead(i.img_head_sub, e.node, gameData.headWeb, null);
i.lbl_lv_target.setLabel("等级达到:" + o);
i.lbl_exp_target.setLabel("(贡献+" + a + ")");
if (r) i.lbl_red.setLabel("提现" + s + "元"); else {
i.lbl_red.setLabel(s);
i.lbl_red_disable.setLabel(s);
}
i.btn_award && i.btn_award.quickBt(function() {
webData.msgGameLevelRed(o, function() {
UICtrl.openUI("uiCommon/uiCommonMoney", function(t) {
t.initNormal(G_MONEY_FROM.LEVEL, s, function() {
gameData.set("gLevelRedAward", o);
e.refreshView(!1);
});
});
}, function() {
e._lastAwardLevel = gameData.get("gLevelRedAward");
e.refreshView(!1);
});
});
i.btn_award_disable.quickBt(function() {
if (t > e.completeIndex + 1) {
UICtrl.closeUI(e);
UICtrl.openUI("uiLevelRed/uiLevelRedSource");
gWordMgr.showTip("请先领前一个奖励");
} else if (gameData.get("gPlayerLevel") < o) {
UICtrl.closeUI(e);
UICtrl.openUI("uiLevelRed/uiLevelRedSource");
gWordMgr.showTip("需达到" + o + "级可领取");
} else r && 1 == r && gWordMgr.showTip("提现需要解锁72级炮塔");
});
}, i = 1; i <= 5; i++) t(i);
},
onDestroy: function() {
gameData.send("moduleTipUpdate", G_WINDOW_FROM.LEVEL);
},
onFlyFriendGroup: function() {
this._lastAwardLevel < gameData.get("gLevelRedAward") && gWealthMgr.flyFriendGroupPower();
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiLoading: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "174e6DUK35F07Ly4z4giAlB", "uiLoading");
var n = e("uiHotUpdate");
cc.Class({
extends: n,
properties: {
isLoading: !0
},
start: function() {},
init: function(e, t) {
var i = this;
this.layout_hall.active = !0;
this.onUpdateFinish(function() {
var n = 0;
i.schedule(function() {
n += 1;
i.img_process.getComponent(cc.Sprite).fillRange = n / 100;
10 == n && i.downloadResources(e, t, 0);
}, .1, 9);
});
},
downloadResources: function(e, t, i) {
var n = i || 0;
this.lastProcess = 0;
cc.macro.DOWNLOAD_MAX_CONCURRENT = 10;
cc.loader.loadResDir(e[n], function(t, i, o) {
if (i > 0) {
var a = Math.floor(100 * (1 / e.length * (t / i) + n * (1 / e.length)));
a < this.lastProcess ? a = this.lastProcess : this.lastProcess = a;
this.img_process.getComponent(cc.Sprite).fillRange = (a + 10) / 100;
}
}.bind(this), function(i, o, a) {
if (++n < e.length) this.downloadResources(e, t, n); else {
console.log("资源加载完成");
t();
}
}.bind(this));
},
showPro: function(e) {
this.img_process.getComponent(cc.Sprite).fillRange = (e + 10) / 100;
}
});
cc._RF.pop();
}, {
uiHotUpdate: "uiHotUpdate"
} ],
uiMonster: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "4dc26fndNVG47G1NciLSMs1", "uiMonster");
cc.Class({
extends: ui.baseLayer,
properties: {
_mID: 0,
_mGID: 0,
_mPath: [],
_mSpeed: 300,
_mPrice: 0,
_mHealth: 100,
_mICON: void 0,
_mFaceLeft: !0,
_mIsBoss: !1,
_mStop: !1,
_mIsSlow: !1
},
start: function() {},
initConfig: function(e) {
this._mID = e.mID;
this._mPath = e.mPath;
this._mGID = e.mGID;
this._mIsBoss = e.mIsBoss;
this._mSpeed = monsterCsvData.getMonSpdByID(this._mID);
this._mHealth = monsterCsvData.getMonHPByID(this._mID);
this._mICON = monsterCsvData.getMonIconByID(this._mID);
this._mPrice = monsterCsvData.getMonGoldByID(this._mID);
this._currHealth = this._mHealth;
this._processBar = this.img_blood.getComponent(cc.Sprite);
this._animCom = this.node_anim.getComponent(cc.Animation);
this._dragonBones = this.node_dragon.getComponent(dragonBones.ArmatureDisplay);
this.i = 1;
this.initUI();
this.initPos();
this.playJump();
},
initUI: function() {
this._mIsBoss ? this.node_dragon.scale = 3 : this.node_dragon.scale = 2;
var e = "monster/" + this._mICON + "/" + this._mICON + "_ske", t = "monster/" + this._mICON + "/" + this._mICON + "_tex";
this._dragonBones.debugDraw = !0;
this._dragonBones.dragonAsset = cc.loader.getRes(e, dragonBones.DragonBonesAsset);
this._dragonBones.dragonAtlasAsset = cc.loader.getRes(t, dragonBones.DragonBonesAtlasAsset);
this._dragonBones.armatureName = "armatureName";
this._dragonBones.playAnimation("newAnimation", -1);
var i = -this._dragonBones.armature().getBone("xt").global.y;
if (this._mIsBoss) {
i *= 3;
this.img_blood_bg.y = i - 25;
this.img_blood_bg.scale = 2;
} else {
i *= 2;
this.img_blood_bg.y = i - 25;
}
gGuideMgr.inGuide() && this.stopGame();
},
playJump: function() {
var e = this;
this.img_blood_bg.active = !1;
var t = this._mSpeed;
this._mSpeed = 100;
this._animCom.play("monsterJump");
this.scheduleOnce(function() {
e.img_blood_bg.active = !0;
e._mSpeed = t;
}, .7);
},
playChaire: function() {
var e = this;
this._mStop = !0;
var t = util.randomRange(1, 10) / 10;
this.scheduleOnce(function() {
e._animCom.play("huanhu");
}, t);
},
playSlow: function() {
if (!this._mIsSlow) {
this._mIsSlow = !0;
gWordMgr.showArtEffect("effect/jiansu", this.node_effect, {
notDestroy: !0
});
}
},
stopSlow: function() {
if (this._mIsSlow) {
this._mIsSlow = !1;
this.node_effect.removeAllChildren();
}
},
initPos: function() {
this.node.position = this._mPath[0].pos;
},
beHurt: function(e) {
if (!(this._currHealth <= 0)) {
var t = e.tPower, i = e.tCrit, n = e.tSpeed, o = this._mHealth * gMonsterMgr.getDamageRate() * n, a = t;
a > o && (a = parseInt(o));
this._currHealth = this._currHealth - a;
gWordMgr.createWord(this._mGID, this.node.position, t, i);
var s = this._currHealth / this._mHealth;
this._processBar.fillRange = s;
this._currHealth <= 0 && this.beDeath();
}
},
beDeath: function() {
var e = this;
UICtrl.createUI("prefab/uiObjects/monsterDeath", function(t) {
if (cc.isValid(e.node) && cc.isValid(e.node.parent)) {
t.parent = e.node.parent;
t.position = e.node.position;
var i = e.node_dragon.scaleX, n = e.node_dragon.scaleY;
t.getComponent("monsterDeath").init(e._mICON, i, n);
gWealthMgr.createMoneyEffect(e.node.position, e._mPrice);
gMonsterMgr.delMonster(e._mGID);
}
});
},
changeFace: function(e) {
if (e > .2) {
if (this._mFaceLeft) {
this._mFaceLeft = !1;
this.node_dragon.scaleX = -Math.abs(this.node_dragon.scaleX);
}
} else if (e < -.2 && !this._mFaceLeft) {
this._mFaceLeft = !0;
this.node_dragon.scaleX = Math.abs(this.node_dragon.scaleX);
}
},
update: function(e) {
if (!this._mStop) if (this.i >= this._mPath.length) gMonsterMgr.monsterRatch(); else {
var t = this._mSpeed;
e > .05 && (e = .05);
var i = t * e, n = this.node.position, o = this._mPath[this.i].pos.sub(n), a = o.normalize();
this.changeFace(a.x);
if (o.mag() < 10) this.i = this.i + 1; else {
var s = a.mul(i), r = n.add(s);
this.node.position = r;
this._frame || (this._frame = 1);
this._frame++;
if (this._frame >= 5) {
this._frame = 0;
this.node.zIndex = -r.y;
}
}
}
},
stopGame: function() {
this._mStop = !0;
this._dragonBones.armature()._animation && this._dragonBones.armature()._animation.stop();
},
resumeGame: function() {
this._mStop = !1;
this._dragonBones.armature()._animation && this._dragonBones.armature()._animation.play();
}
});
cc._RF.pop();
}, {} ],
uiMoreGame: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "05c3caFlJRLW4ItpRYewVMQ", "uiMoreGame");
cc.Class({
extends: e("uiWindowBase"),
properties: {
itemPrefab: cc.Prefab,
itemPrefab2: cc.Prefab
},
start: function() {
this.resize();
this.addEvents();
this.initTopInfo();
this.initOtherGame();
},
updateScroll: function() {
this.scrollview_otherGame.getComponent(cc.ScrollView).scrollToTop(0);
},
initTopInfo: function() {
var e = 0;
if (gameData.tiXianMoney) e = gameData.tiXianMoney; else {
e = util.randomRange(683e3, 688e3);
gameData.tiXianMoney = e;
}
var t = 0;
if (gameData.tiXianHumen) t = gameData.tiXianHumen; else {
t = util.randomRange(256100, 256800);
gameData.tiXianHumen = t;
}
this.lbl_game_desc_1.getComponent(cc.Label).string = "已有" + t + "人参与";
this.lbl_game_desc_3.getComponent(cc.Label).string = e + "元";
},
resize: function() {
var e = cc.Canvas.instance.node.getContentSize();
this.img_bg_top.y = e.height / 2;
this.img_down.y = -e.height / 2;
var t = e.height - 450;
this.img_scroll_bg.setContentSize(682, t + 30);
this.scrollview_otherGame.setContentSize(682, t);
this.scroll_view.setContentSize(682, t);
this.node_items.setContentSize(682, t);
this.node_items.y = t;
this.img_scroll_bg_2.y = t + 50;
},
initUI: function() {
this.node.active = !0;
this.initOtherGame();
},
initOtherGame: function() {
var e = this;
if (!this._otherGameInfo || this._otherGameInfo.length <= 0) {
this.node_loading.active = !0;
this._otherGameInfo = [];
pageData.msgGetOtherGameConfig(function(t) {
e.node_loading.active = !1;
var i = [];
for (var n in t) {
var o = t[n];
o.packageName && nativeData.checkAppInstalled(o.packageName) ? i.push(o) : e._otherGameInfo.push(o);
}
e._otherGameInfo = e._otherGameInfo.concat(i);
e.initOtherGameList();
GM._otherGameInfo = e._otherGameInfo;
}, function() {
e.node_loading.active = !1;
gWordMgr.showTip("网络异常，请稍后重试");
});
} else this.node_loading.active = !1;
},
addEvents: function() {
var e = this;
this.btn_return.quickBt(function() {
e.node.active = !1;
});
cc.game.on(cc.game.EVENT_SHOW, function() {
setTimeout(function() {
e.refreshView();
}, 200);
});
},
initOtherGameList: function() {
this.node_items.removeAllChildren();
this.itemList = [];
for (var e in this._otherGameInfo) {
var t;
parseInt(e) < 4 ? (t = cc.instantiate(this.itemPrefab2)).parent = this.layout_items : (t = cc.instantiate(this.itemPrefab)).parent = this.node_items;
this.createItem(e, t, this._otherGameInfo[e]);
t.info = this._otherGameInfo[e];
this.itemList.push(t);
}
},
refreshView: function() {
console.log("[刷新试玩界面]");
for (var e = 0; e < this.itemList.length; e++) {
var t = this.itemList[e], i = t.info;
i.packageName && (nativeData.checkAppInstalled(i.packageName) ? this.swithStatus(t, "open") : t._downloadingUrl ? this.swithStatus(t, "downloading") : this.swithStatus(t, "start"));
}
},
createItem: function(e, t, i) {
var n = this;
if (i && t) {
util.loadUrlImg(t.img_icon, pageData.getPublicURL() + "icon/" + i.icon + ".png");
t.lbl_game_name.getComponent(cc.Label).string = i.name;
i.title && (t.lbl_rich_title.getComponent(cc.RichText).string = i.title);
i.packageName && (nativeData.checkAppInstalled(i.packageName) ? this.swithStatus(t, "open") : this.swithStatus(t, "start"));
var o = t.info;
t.info = i;
if (!o) {
t.setProgress = function(e) {
console.log("[试玩]download", "downloadAPK " + e + "%");
t.lbl_progress.setLabel(e + "%");
t.img_progress.getComponent(cc.Sprite).fillRange = e / 100;
};
t.quickBt(function() {
var e = t.info, i = gameData.get("gTrialList");
if (e.id && !i[e.id]) {
i[e.id] = 1;
gameData.set("gTrialList", i);
}
n.tryDownloadOrOpen(t, e);
}, !0);
t.btn_otherGame.quickBt(function() {
var e = t.info, i = gameData.get("gTrialList");
if (e.id && !i[e.id]) {
i[e.id] = 1;
gameData.set("gTrialList", i);
}
n.tryDownloadOrOpen(t, e);
});
}
}
},
swithStatus: function(e, t) {
if (e) switch (t) {
case "start":
e.img_start.active = !0;
e.img_open.active = !1;
e.img_downloading.active = !1;
e.lbl_progress.setLabel("0%");
e.img_progress.getComponent(cc.Sprite).fillRange = 0;
break;

case "open":
e.img_start.active = !1;
e.img_open.active = !0;
e.img_downloading.active = !1;
e.lbl_progress.setLabel("0%");
e.img_progress.getComponent(cc.Sprite).fillRange = 0;
break;

default:
e.img_start.active = !1;
e.img_open.active = !1;
e.img_downloading.active = !0;
}
},
tryDownloadOrOpen: function(e, t) {
var i = this, n = t.bNoHttps ? "http://" : "https://";
n += t.address;
if (cc.sys.os == cc.sys.OS_ANDROID) {
var o = t.packageName;
if (o) if (nativeData.checkAppInstalled(o)) {
console.log("[试玩]已安装,直接打开");
nativeData.startApp(o);
e._downloadingUrl = null;
} else if (e._downloadingUrl) console.log("[试玩]正在下载中 ", e._downloadingUrl); else {
e._downloadingUrl = n;
var a = jsb.fileUtils.getWritablePath() + n.match(/[^\/]+\.apk/);
if (!e.downloader) {
e.downloader = new jsb.Downloader();
e.downloader.setOnFileTaskSuccess(function() {
console.log("[试玩]download", "downloadAPK 下载成功");
e._downloadingUrl = null;
setTimeout(function() {
nativeData.InstallApk(a);
}, .1);
setTimeout(function() {
console.log("[试玩]判断是否安装" + o);
if (nativeData.checkAppInstalled(o)) {
console.log("[试玩]安装了");
var e = gameData.get("gPlayedList");
if (t.id && !e[t.id]) {
e[t.id] = 1;
gameData.set("gPlayedList", e);
}
} else console.log("[试玩]没安装");
}, 5e3);
});
e.downloader.setOnTaskProgress(function(t, i, n, o) {
var a = (n / o * 100).toFixed(1);
e.setProgress(a);
});
e.downloader.setOnTaskError(function() {
console.log("[试玩]download", "downloadAPK 下载失败");
e._downloadingUrl = null;
i.swithStatus(e, "start");
});
}
e.downloader.createDownloadFileTask(n, a, "");
this.swithStatus(e, "downloading");
} else console.log("[试玩]packageName,为空");
} else {
console.log("[试玩]不是安卓平台,直接跳转");
cc.sys.openURL(n);
}
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiNewMoney: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "28dc1aB+61GT7CkkAvte74o", "uiNewMoney");
cc.Enum({
DOING: 1,
GET: 2,
DONE: 3
});
cc.Class({
extends: e("uiWindowBase"),
properties: {},
start: function() {
this._currTab = 0;
this.initEvent();
this.initData();
this.initTab();
this.updateTabTip();
this.updateProcess();
webData.msgSendRecore(G_WINDOW_FROM.NEW);
gameData.set("gOpenWithNewWindow", !0);
},
switchTab: function(e) {
if (e != this._currTab) if (e > this._unlockDay) 4 == e || 5 == e || 6 == e ? gWordMgr.showTip("累计登录3天后开启") : 7 == e && gWordMgr.showTip("累计登录6天后开启"); else {
for (var t = 1; t <= 7; t++) if (e == t) {
this["tab_light_" + t].active = !0;
this["node_dark_" + t].active = !1;
} else {
this["tab_light_" + t].active = !1;
this["node_dark_" + t].active = !0;
}
this.showTabData(e);
}
},
initData: function() {
this._configs = newMoneyCsvData.getAllDatas();
this._currConfig = {};
for (var e in this._configs) {
var t = this._configs[e];
this._currConfig[t.day] || (this._currConfig[t.day] = []);
this._currConfig[t.day].push(t);
}
console.log("======[新人配置]===", this._currConfig);
this._currChildren = this.node_down_item.getChildren();
gameData.gAllLoginDay || gameData.set("gAllLoginDay", 1);
this._unlockDay = gFunctionMgr.getNewUnlockByDay(gameData.gAllLoginDay);
},
initTab: function() {
this._firstToGetTab = 0;
this._firstUnAchieveTab = 0;
for (var e in this._configs) {
var t = this._configs[e], i = t.ID, n = t.parm, o = t.task_type, a = gFunctionMgr.getNewTaskState(o);
1 != gameData.gNewTaskComplete[i] && (a >= n ? t.day <= gameData.gAllLoginDay && (this._firstToGetTab || (this._firstToGetTab = t.day)) : t.day <= gameData.gAllLoginDay && (this._firstUnAchieveTab || (this._firstUnAchieveTab = t.day)));
}
console.log("[当前切换TAB]", this._firstToGetTab, this._firstUnAchieveTab);
this._firstToGetTab > 0 ? this.switchTab(this._firstToGetTab) : this._firstUnAchieveTab > 0 ? this.switchTab(this._firstUnAchieveTab) : this.switchTab(1);
},
initEvent: function() {
var e = this;
this.btn_close.quickBt(function() {
e.closeSelf();
});
this.tab_dark_1.quickBt(function() {
e.switchTab(1);
}, !0);
this.tab_dark_2.quickBt(function() {
e.switchTab(2);
}, !0);
this.tab_dark_3.quickBt(function() {
e.switchTab(3);
}, !0);
this.tab_dark_4.quickBt(function() {
e.switchTab(4);
}, !0);
this.tab_dark_5.quickBt(function() {
e.switchTab(5);
}, !0);
this.tab_dark_6.quickBt(function() {
e.switchTab(6);
}, !0);
this.tab_dark_7.quickBt(function() {
e.switchTab(7);
}, !0);
this.btn_tixian.quickBt(function() {
e.toTiXian();
});
this.btn_des.quickBt(function() {
UICtrl.openUI("uiNewMoney/uiNewMoneyDes");
});
},
closeSelf: function() {
this.closeToNode(G_NODE.HALL.img_new_money);
},
updateProcess: function() {
var e = gameData.gNewTaskComplete, t = 0;
for (var i in e) {
var n = this._configs[i].exp_num;
t += parseInt(n);
}
this.lbl_tixian_process.getComponent(cc.Label).string = t + "/100";
this.img_process.getComponent(cc.Sprite).fillRange = t / 100;
},
showTabData: function(e) {
var t = this._currConfig[e];
for (var i in this._currChildren) if (t[i]) {
this._currChildren[i].active = !0;
this.showItem(this._currChildren[i], t[i]);
} else this._currChildren[i].active = !1;
},
showItem: function(e, t) {
var i = this, n = t.ID, o = t.info, a = t.parm, s = t.exp_num, r = t.task_type;
e.lbl_title.getComponent(cc.Label).string = o;
e.lbl_process_plus.getComponent(cc.Label).string = "提现进度+" + s;
var c = gFunctionMgr.getNewTaskState(r), l = "<color=#63320A>(</c><color=#367F00>" + c + "/" + a + "</color><color=#63320A>)</c>";
e.lbl_process.getComponent(cc.RichText).string = l;
if (1 == gameData.gNewTaskComplete[n]) {
e.btn_hasGet.active = !0;
e.btn_toGet.active = !1;
e.btn_unAchieve.active = !1;
} else if (c >= a) {
e.btn_hasGet.active = !1;
e.btn_toGet.active = !0;
e.btn_unAchieve.active = !1;
} else {
e.btn_hasGet.active = !1;
e.btn_toGet.active = !1;
e.btn_unAchieve.active = !0;
}
if (1 == r || 4 == r) {
e.btn_unAchieve_light.active = !0;
e.btn_unAchieve_gray.active = !1;
} else {
e.btn_unAchieve_light.active = !1;
e.btn_unAchieve_gray.active = !0;
}
e.btn_unAchieve.quickBt(function() {
if (1 == r) {
UICtrl.closeUI(i);
gWordMgr.showTip("请拖动合成相同的炮塔");
} else if (4 == r) {
i.setForceWindow(!1);
UICtrl.closeUI(i);
UICtrl.openUI("uiTask/uiTask");
}
});
e.btn_toGet.quickBt(function() {
gameData.gNewTaskComplete[n] = !0;
gameData.save("gNewTaskComplete");
i.updateProcess();
i.showItem(e, t);
var o = "进度+" + s;
UICtrl.openUI("uiCommon/uiCommonTip", function(e) {
e.initScript(o);
UICtrl.closeUI(i);
});
i.updateTabTip();
});
},
updateTabTip: function() {
for (var e in this._currConfig) {
this["btn_tip_" + e].active = !1;
if (e <= this._unlockDay) {
var t = this._currConfig[e];
for (var i in t) {
var n = t[i], o = n.ID, a = n.parm, s = n.task_type, r = gFunctionMgr.getNewTaskState(s);
if (!gameData.gNewTaskComplete[o] && r >= a) {
this["btn_tip_" + e].active = !0;
console.log("[红点]", e, i, r, a);
}
}
}
}
},
toTiXian: function() {
this.img_process.getComponent(cc.Sprite).fillRange < 1 ? gWordMgr.showTip("进度条未满，不能提现5元现金") : gWordMgr.showTip("账号等级未到68级，不能领取");
},
onDestroy: function() {
gameData.send("moduleTipUpdate", G_WINDOW_FROM.NEW);
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiRank: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "080efOBMoVEUZ6O55tSwaCC", "uiRank");
cc.Class({
extends: e("uiWindowBase"),
properties: {
defaultAvator: cc.SpriteFrame
},
start: function() {
this.addEvents();
this.currentPage = 1;
this._wordDataList = {};
this.updateWordList();
},
addEvents: function() {
var e = this;
this.btn_close.quickBt(function() {
UICtrl.closeUI(e);
});
this.btn_invite.quickBt(function() {
console.log("邀请好友");
UICtrl.openUI("uiInvite/uiInvite");
});
this.btn_prev.quickBt(function() {
console.log("上一页");
e.previousPage();
});
this.btn_next.quickBt(function() {
console.log("下一页");
e.nextPage();
});
},
previousPage: function() {
if (this._canTouch && !(this.currentPage <= 1)) {
this.currentPage--;
this._canTouch = !1;
this.updateWordList();
}
},
nextPage: function() {
if (this._canTouch && !(this.currentPage >= this.currentPageMax)) {
this.currentPage++;
this._canTouch = !1;
this.updateWordList();
}
},
updateWordList: function() {
var e = this;
if (this._wordDataList[this.currentPage]) {
this._canTouch = !0;
this.updateWordData(this._wordDataList[this.currentPage]);
this.lbl_left.getComponent(cc.Label).string = this.currentPage;
} else {
var t = 7 * (this.currentPage - 1);
webData.msgRank({
StarIndex: t,
GetOwnRank: !0
}, function(t) {
if (e && cc.isValid(e.node)) {
e._canTouch = !0;
var i = t.Datalist;
if (i && 0 != i.length) {
e._wordDataList[e.currentPage] = i;
e.updateWordData(i);
1 == e.currentPage && e.updateMyItem(t);
var n = Math.ceil(t.TotalRankSize / 7);
e.currentPageMax = n;
e.lbl_right.getComponent(cc.Label).string = n;
e.lbl_left.getComponent(cc.Label).string = e.currentPage;
} else {
e.currentPage--;
e.currentPage < 1 && (e.currentPage = 1);
}
}
}, function() {
e._canTouch = !0;
});
}
},
updateWordData: function(e) {
for (var t = this.node_scorllview.children, i = 0; i < 7; i++) if (e[i]) {
t[i].active = !0;
this.userItem(t[i], e[i]);
} else t[i].active = !1;
},
userItem: function(e, t) {
var i = this;
e.active = !0;
var n = t.rank, o = t.pigID || 1, a = t.avatarUrl, s = towerCsvData.getAttackNameByID(o), r = o, c = t.nickname || "游客";
c = util.cutstr(c, 10);
e.lbl_name.getComponent(cc.Label).string = c;
e.lbl_power.getComponent(cc.Label).string = "L" + r;
e.lbl_tower.getComponent(cc.Label).string = s;
e.lbl_level.getComponent(cc.Label).string = n;
if (n <= 3) {
e.img_level.active = !0;
e.lbl_level.active = !1;
} else {
e.img_level.active = !1;
e.lbl_level.active = !0;
}
a && "" != a && -1 != a.indexOf("/") ? cc.loader.load({
url: a,
type: "png"
}, function(t, n) {
cc.isValid(i.node) && (e.img_head.getComponent(cc.Sprite).spriteFrame = t ? i.defaultAvator : new cc.SpriteFrame(n));
}) : e.img_head.getComponent(cc.Sprite).spriteFrame = this.defaultAvator;
},
updateMyItem: function(e) {
var t = this, i = e.MyRank, n = this.node_my, o = 1;
if (-1 == i) {
i = 999;
o = gameData.get("gMaxTower");
} else o = e.MyPigID;
o <= 0 && (o = 1);
var a = o, s = towerCsvData.getAttackNameByID(o), r = gameData.nickname || "游客";
r = util.cutstr(r, 10);
n.lbl_name.getComponent(cc.Label).string = r;
n.lbl_power.getComponent(cc.Label).string = "L" + a;
n.lbl_tower.getComponent(cc.Label).string = s;
n.lbl_level.getComponent(cc.Label).string = i;
gameData.headWeb && "" != gameData.headWeb ? cc.loader.load({
url: gameData.headWeb,
type: "png"
}, function(e, i) {
cc.isValid(t.node) && (n.img_head.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(i));
}) : n.img_head.getComponent(cc.Sprite).spriteFrame = this.defaultAvator;
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiRewardVideo: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "91788tqqoZE+LRYUj54GJIU", "uiRewardVideo");
cc.Class({
extends: e("uiBaseLwAd"),
properties: {
_sucCallback: null,
_failCallback: null,
_bFinish: !1,
_bVideoReady: !1,
_videoPlayerCom: null
},
onInit: function() {
this._initVideo();
this._initEvent();
},
_initEvent: function() {
var e = this;
this.btn_mute.onClick(function() {
e.selectMute();
});
this.schedule(function() {
e.updateTimer();
}, 1);
},
onDestroy: function() {
this._bFinish ? LWADSDK.onRewardSuc() : LWADSDK.onRewardFail();
},
_initVideo: function() {
var e = this;
if (this._videoPlayerCom) this.btn_close.active = !0; else {
var t = this._adData.get("material_url");
if (t.indexOf(".mp4") <= 0) {
LWADSDK.log("视频素材错误 " + t);
this.btn_close.active = !0;
} else {
this._videoPlayerCom = this.video_playerNode.getComponent(cc.VideoPlayer);
this.updateVioceBtn();
if (this._adData.getVideoClip()) {
this._videoPlayerCom.resourceType = cc.VideoPlayer.ResourceType.LOCAL;
this._videoPlayerCom.clip = this._adData.getVideoClip();
LWADSDK.log("加载本地视频");
} else {
LWADSDK.log("加载远程视频");
this._videoPlayerCom.remoteURL = t;
}
this.video_playerNode.on("ready-to-play", function() {
LWADSDK.log("视频加载成功");
e._bVideoReady = !0;
e.btn_close.active = !1;
e.node.active && e._playVideo();
});
this.video_playerNode.on("clicked", function() {
LWADSDK.log("clicked");
});
this.video_playerNode.on("completed", function() {
LWADSDK.log("completed");
e.btn_close.active = !0;
e._bFinish = !0;
e.lbl_timer.setLabel(0);
e._adData.sendMarkWatch();
});
this.scheduleOnce(function() {
if (!e._bVideoReady) {
LWADSDK.log("视频加载失败" + t);
e.btn_close.active = !0;
}
}, 3);
this.scheduleOnce(function() {
if (!e.btn_close.active) {
LWADSDK.log("视频播放超时" + t);
e.btn_close.active = !0;
}
}, 60);
}
}
},
_playVideo: function() {
if (this._bVideoReady) {
LWADSDK.log("播放视频");
this._videoPlayerCom.play();
}
},
selectMute: function() {
if (cc.isValid(this._videoPlayerCom)) {
0 == this._videoPlayerCom.volume ? this._videoPlayerCom.volume = 100 : this._videoPlayerCom.volume = 0;
this.updateVioceBtn();
}
},
updateVioceBtn: function() {
var e = 0 == this._videoPlayerCom.volume;
this.sp_muteFalse.active = !e;
this.sp_muteTrue.active = e;
},
updateTimer: function() {
if (cc.isValid(this._videoPlayerCom) && !this._bFinish) {
this.img_timer.active = !0;
this.lbl_timer.setLabel(Math.ceil(this._videoPlayerCom.getDuration() - this._videoPlayerCom.currentTime));
}
}
});
cc._RF.pop();
}, {
uiBaseLwAd: "uiBaseLwAd"
} ],
uiRoller2: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "17f6dju/q5NFI3HMKCVdhvH", "uiRoller2");
cc.Class({
extends: e("uiWindowBase"),
properties: {},
start: function() {
this._inRotation = !1;
this._currIndex = 1;
this.initData();
this.initEvent();
},
initEvent: function() {
var e = this;
this.btn_start.quickBt(function() {
gameData.plus("gNextDivdendTaskLevel", 1);
e.startRotation();
}, !0);
this.btn_Close.quickBt(function() {
e._inRotation ? gWordMgr.showTip("请等待转动结束") : UICtrl.closeUI(e);
});
},
initData: function() {
var e = this.node_Items.getChildren();
this.itemList = e;
},
startRotation: function() {
if (!this._inRotation) {
this._inRotation = !0;
this.btn_start.canTouch = !1;
this.node_Items.getChildren().forEach(function(e) {
e.lbl_des.color = cc.color(255, 255, 255);
});
var e = this.getTargetIndex();
this.beginRotation(e);
}
},
beginRotation: function(e) {
this.resetYellowOfItem();
audioData.playSoundByID(11);
this.rotationWitchAngle(e, function() {
var t = this;
this._currIndex = e;
this.setYellowOfItem();
this.scheduleOnce(function() {
t.showAward();
}, .5);
this.node_Items.getChildren()[e - 1].lbl_des.color = cc.color(127, 66, 0);
});
},
rotationWitchAngle: function(e, t) {
var i = 0;
2 == e ? i += -97.5 : 3 == e && (i += 97.5);
console.log("======index======", e, i);
var n = cc.rotateBy(3, i + 3600);
n.easing(cc.easeCircleActionInOut());
var o = cc.callFunc(t, this), a = cc.sequence(n, o);
this.node_Cricle.runAction(a);
},
getTargetIndex: function() {
var e = util.randomRange(2, 3);
console.log("[转到了]", e);
return e;
},
setYellowOfItem: function() {
var e = this;
this.itemList.forEach(function(t, i) {
i == e._currIndex - 1 ? t.img_Triangle.active = !0 : t.img_Triangle.active = !1;
});
},
resetYellowOfItem: function() {
this.itemList.forEach(function(e) {
e.img_Triangle.active = !1;
});
},
showAward: function() {
var e = this;
audioData.playSoundByID(12);
if (2 == this._currIndex) {
var t = lotteryDivdendCsvData.getInfoByID(2), i = util.randomRange(t.num_min, t.num_max);
UICtrl.closeUI(this);
UICtrl.openUI("uiCommon/uiCommonSupply", function(e) {
e.initNormal(i);
});
} else if (3 == this._currIndex) {
var n = lotteryDivdendCsvData.getInfoByID(1), o = util.randomRange(n.num_min, n.num_max);
UICtrl.closeUI(this);
UICtrl.openUI("uiCommon/uiCommonMoney", function(e) {
e.initNormal(G_MONEY_FROM.ROLLER, o);
});
}
this.scheduleOnce(function() {
e._inRotation = !1;
}, .5);
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiRoller: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "5cdd4HUaiNKuZ8WI1PZJf4F", "uiRoller");
cc.Class({
extends: e("uiWindowBase"),
properties: {},
start: function() {
this._inRotation = !1;
this.inpuLog = !1;
this._currIndex = 1;
this.initEvent();
this.initData();
webData.msgSendRecore(G_WINDOW_FROM.ROLLER);
this.setIOSHide();
},
setIOSHide: function() {
cc.sys.os == cc.sys.OS_IOS && (this.lbl_ios_tip.active = !0);
},
initEvent: function() {
var e = this;
this.btn_start.quickBt(function() {
e.btn_start.isVideo ? shareData.toVideo(function(t) {
webData.msgSaveVideo(G_VIDEO_FROM.ROLLER, function() {
e.startRotation();
}, t);
}) : e.startRotation();
}, !0);
this.btn_Close.quickBt(function() {
e._inRotation ? gWordMgr.showTip("请等待转动结束") : UICtrl.closeUI(e);
});
this.btn_Plus.quickBt(function() {
e._inRotation;
});
},
initData: function() {
var e = this, t = luckyRollerData.getAllDatas();
this.tableConfig = [];
for (var i in t) {
var n = t[i];
n.icon = "image/roller/icon/icon_" + i;
n.iconName = "image/roller/name/name_" + i;
this.tableConfig.push(n);
}
this.inpuLog && console.log("[初始化转盘数据]", this.tableConfig);
var o = this.node_Items.getChildren();
this.itemList = o;
this.itemList.forEach(function(t, i) {
var n = e.tableConfig[i];
t.img_Triangle.active = !1;
t.img_Goods.scale = 1.2;
util.display(t.lbl_des, n.iconName);
util.display(t.img_Goods, n.icon);
});
this.updateTicket();
},
startRotation: function() {
if (!this._inRotation) if (void 0 == gameData.get("gDayTicket") || gameData.get("gDayTicket") <= 0) gWordMgr.showTip("每天12:00、18:00、00:00重置"); else {
this._inRotation = !0;
this.btn_start.canTouch = !1;
this.node_Items.getChildren().forEach(function(e) {
e.lbl_des.color = cc.color(255, 255, 255);
});
var e = this.getTargetIndex();
this.beginRotation(e);
}
},
beginRotation: function(e) {
var t = 8 - e + this._currIndex;
this.resetYellowOfItem();
audioData.playSoundByID(11);
gWindowMgr.closeBanner();
this.rotationWitchAngle(t, function() {
this._currIndex = e;
this.setYellowOfItem();
this.showAward();
gameData.plus("gDayTicket", -1);
gameData.plus("gDayRollerCount", 1);
gameData.plus("gAllRollerCount", 1);
gFunctionMgr.addPlayerExp(G_EXP_FROM.ROLLER, gameData.gDayRollerCount);
this.updateTicket();
this.node_Items.getChildren()[e - 1].lbl_des.color = cc.color(127, 66, 0);
});
},
rotationWitchAngle: function(e, t) {
var i = 45 * e + 3600, n = cc.rotateBy(3, i);
n.easing(cc.easeCircleActionInOut());
var o = cc.callFunc(t, this), a = cc.sequence(n, o);
this.node_Cricle.runAction(a);
},
getTargetIndex: function() {
var e = util.randomRange(1, 1e4), t = 0;
for (var i in this.tableConfig) {
var n = this.tableConfig[i];
if (e < (t += n.probability1)) {
this.inpuLog && console.log("[抽奖：普通情况]", e, t, n.id);
return n.id;
}
}
return 1;
},
setYellowOfItem: function() {
var e = this;
this.itemList.forEach(function(t, i) {
i == e._currIndex - 1 ? t.img_Triangle.active = !0 : t.img_Triangle.active = !1;
});
},
resetYellowOfItem: function() {
this.itemList.forEach(function(e) {
e.img_Triangle.active = !1;
});
},
addTicket: function() {},
updateTicket: function() {
void 0 == gameData.get("gDayTicket") && gameData.set("gDayTicket", 0);
this.lbl_Ticket_Num.getComponent(cc.Label).string = gameData.get("gDayTicket");
if (2 == gameData.gDayTicket || 4 == gameData.gDayTicket || 7 == gameData.gDayTicket) {
this.btn_start.isVideo = !0;
this.lbl_start_video.active = !0;
this.lbl_start.x = 46;
} else {
this.btn_start.isVideo = !1;
this.lbl_start_video.active = !1;
this.lbl_start.x = 0;
}
},
showAward: function() {
var e = this;
audioData.playSoundByID(12);
var t = this.tableConfig[this._currIndex - 1];
if (1 == t.reward_type) {
var i = parseInt(t.reward_num);
UICtrl.openUI("uiCommon/uiCommonMoney", function(e) {
e.initNormal(G_MONEY_FROM.ROLLER, i);
});
} else if (2 == t.reward_type) {
var n = parseInt(t.reward_num);
UICtrl.openUI("uiCommon/uiCommonSupply", function(e) {
e.initNormal(n);
});
}
this.scheduleOnce(function() {
e._inRotation = !1;
e.btn_start.canTouch = !0;
}, .5);
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiScrollViewExt: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "2f602X5oFBPqqtZJc5eoOQ5", "uiScrollViewExt");
var n = cc.Enum({
Vertical: 0,
Horizontai: 1
});
cc.Class({
extends: cc.Component,
properties: {
itemTemplate: cc.Prefab,
rowCount: {
default: 6,
type: cc.Integer,
tooltip: "显示多少行"
},
colCount: {
default: 1,
type: cc.Integer,
tooltip: "显示多少列"
},
cacheNum: {
default: 5,
type: cc.Integer,
tooltip: "多缓存的item数"
},
direction: {
type: n,
default: n.Vertical,
tooltip: "//是否是横向的,默认为数方向的"
}
},
onLoad: function() {
this.updateTimer = 0;
this.updateInterval = .05;
this.direction == n.Horizontai ? this.cacheItems = this.rowCount + this.cacheNum : this.cacheItems = this.colCount + this.cacheNum;
this.items = [];
var e = cc.instantiate(this.itemTemplate);
this.itemHeight = e.height;
this.itemWidth = e.width;
this.direction == n.Horizontai ? this.spawnCount = this.cacheItems * this.rowCount : this.spawnCount = this.cacheItems * this.colCount;
this.direction == n.Horizontai ? this.bufferZone = this.cacheItems * this.itemWidth / 2 : this.bufferZone = this.cacheItems * this.itemHeight / 2;
this.scrollView = this.getComponent(cc.ScrollView);
this.content = this.scrollView.content;
this.direction == n.Horizontai ? this.contentLength = this.scrollView.content.x : this.contentLength = this.scrollView.content.y;
},
resetData: function(e, t) {
this.isInit = this.initialize(e, t);
},
initialize: function(e, t) {
if (!(t && e && 0 !== e.length && this.itemTemplate && this.scrollView)) {
console.log("初始化失败，请检查所有必要参数");
return !1;
}
this.data = e;
this.itemUpdateFunc = t;
this.direction == n.Horizontai ? this.totalRow = Math.ceil(e.length / this.rowCount) : this.totalRow = Math.ceil(e.length / this.colCount);
this.lastContentPosY = 0;
if (this.direction == n.Horizontai) {
this.content.height = this.rowCount * this.itemWidth;
this.content.width = this.totalRow * this.itemHeight;
} else {
this.content.height = this.totalRow * this.itemHeight;
this.content.width = this.colCount * this.itemWidth;
}
this.direction == n.Horizontai ? this.scrollView.content.x = this.contentLength : this.scrollView.content.y = this.contentLength;
if (this.direction == n.Horizontai) for (var i = 0, o = 0; o < this.spawnCount; o += this.rowCount) {
for (var a = this.itemWidth * (.5 + i), s = 0; s < this.rowCount; s++) {
var r = o + s, c = null;
if (r >= this.items.length) {
c = cc.instantiate(this.itemTemplate);
this.items.push(c);
this.content.addChild(c);
} else c = this.items[o + s];
var l = this.content.height / 2 - (s + .5) * this.itemHeight;
c.setPosition(a, l);
c.itemId = r;
if (r >= this.data.length) c.active = !1; else {
c.active = !0;
this.itemUpdateFunc(r, c, this.data[r]);
}
}
i++;
} else for (var u = 0, h = 0; h < this.spawnCount; h += this.colCount) {
for (var d = -this.itemHeight * (.5 + u), g = 0; g < this.colCount; g++) {
var f = h + g, p = null;
if (f >= this.items.length) {
p = cc.instantiate(this.itemTemplate);
this.items.push(p);
this.content.addChild(p);
} else p = this.items[h + g];
var m = (g + .5) * this.itemWidth - this.content.width / 2;
p.setPosition(m, d);
p.itemId = f;
if (f >= this.data.length) p.active = !1; else {
p.active = !0;
this.itemUpdateFunc(f, p, this.data[f]);
}
}
u++;
}
return !0;
},
getPositionInView: function(e) {
var t = e.parent.convertToWorldSpaceAR(e.position);
return this.scrollView.node.convertToNodeSpaceAR(t);
},
update: function(e) {
this.updateTimer += e;
if (this.isInit && !(this.updateTimer < this.updateInterval)) {
this.updateTimer = 0;
this.direction == n.Horizontai ? this.updateHorizontai() : this.updateVertical();
}
},
updateHorizontai: function() {
if (this.scrollView.content.x != this.lastContentPosY) {
var e = this.items, t = this.scrollView.content.x > this.lastContentPosY;
this.lastContentPosY = this.scrollView.content.x;
for (var i = this.itemWidth * this.cacheItems, n = 0, o = 0; o < e.length; o += this.rowCount) {
var a = this.getPositionInView(e[o]);
if (t) {
n = e[o].x - i;
if (a.x > this.bufferZone && n > 0) for (var s = 0; s < this.rowCount; s++) {
var r = s + o;
e[r].x = n;
var c = e[r].itemId - this.spawnCount;
e[r].itemId = c;
if (c >= 0 && c < this.data.length) {
e[r].active = !0;
this.itemUpdateFunc(c, e[r], this.data[c]);
} else e[r].active = !1;
}
} else {
n = e[o].x + i;
if (a.x < -this.bufferZone && n < this.content.width) for (var l = 0; l < this.rowCount; l++) {
var u = l + o;
e[u].x = n;
var h = e[u].itemId + this.spawnCount;
e[u].itemId = h;
if (h >= 0 && h < this.data.length) {
e[u].active = !0;
this.itemUpdateFunc(h, e[u], this.data[h]);
} else e[u].active = !1;
}
}
}
}
},
updateVertical: function() {
if (this.scrollView.content.y != this.lastContentPosY) {
var e = this.items, t = this.scrollView.content.y < this.lastContentPosY;
this.lastContentPosY = this.scrollView.content.y;
for (var i = this.itemHeight * this.cacheItems, n = 0, o = 0; o < e.length; o += this.colCount) {
var a = this.getPositionInView(e[o]);
if (t) {
n = e[o].y + i;
if (a.y < -this.bufferZone && n < 0) for (var s = 0; s < this.colCount; s++) {
var r = s + o;
e[r].y = n;
var c = e[r].itemId - this.spawnCount;
e[r].itemId = c;
if (c >= 0 && c < this.data.length) {
e[r].active = !0;
this.itemUpdateFunc(c, e[r], this.data[c]);
} else e[r].active = !1;
}
} else {
n = e[o].y - i;
if (a.y > this.bufferZone && n > -this.content.height) for (var l = 0; l < this.colCount; l++) {
var u = l + o;
e[u].y = n;
var h = e[u].itemId + this.spawnCount;
e[u].itemId = h;
if (h >= 0 && h < this.data.length) {
e[u].active = !0;
this.itemUpdateFunc(h, e[u], this.data[h]);
} else e[u].active = !1;
}
}
}
}
},
updateItems: function() {
var e = this;
this.items.forEach(function(t) {
var i = t.itemId;
e.data[i] && e.itemUpdateFunc(i, t, e.data[i]);
});
},
updateItem: function(e) {
var t = this;
this.items.forEach(function(i) {
var n = i.itemId;
t.data[n] == e && t.itemUpdateFunc(n, i, t.data[n]);
});
}
});
cc._RF.pop();
}, {} ],
uiScrollView: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "42744+ZCR5Ljoyrs1FndehB", "uiScrollView");
cc.Class({
extends: cc.Component,
properties: {
itemTemplate: cc.Prefab,
spacing: 0,
rowCount: 6,
colCount: 1,
scrollView: cc.ScrollView
},
onLoad: function() {
this.updateTimer = 0;
this.updateInterval = .05;
this.cacheRow = this.rowCount + 5;
this.rowCount = Math.ceil(this.rowCount);
this.items = [];
var e = cc.instantiate(this.itemTemplate);
this.itemHeight = e.height;
this.itemWidth = e.width;
this.spawnCount = this.cacheRow * this.colCount;
this.bufferZone = this.cacheRow * (this.itemHeight + this.spacing) / 2;
this.content = this.scrollView.content;
this.contenty = this.scrollView.content.y;
},
resetData: function(e, t, i) {
this.isInit = this.initialize(e, t, i);
},
initialize: function(e, t, i) {
if (!(t && e && 0 !== e.length && this.itemTemplate && this.scrollView)) {
console.log("初始化失败，请检查所有必要参数");
return !1;
}
this.data = e;
this.itemUpdateFunc = t;
this.totalRow = Math.ceil(e.length / this.colCount);
this.lastContentPosY = 0;
this.content.height = this.totalRow * (this.itemHeight + this.spacing) + this.spacing;
this.content.width = this.colCount * (this.itemWidth + this.spacing) + this.spacing;
(i = i || 0) < 0 && (i = 0);
this.scrollView.content.y = this.contenty + (this.itemHeight + this.spacing) * i;
if (i >= this.data.length) {
i = this.data.length - 1;
this.scrollView.content.y = this.content.height - this.contenty;
}
for (var n = Math.floor(i / this.cacheRow), o = (this.itemHeight + this.spacing) * this.cacheRow, a = 0, s = 0; s < this.spawnCount; s += this.colCount) {
for (var r = -this.itemHeight * (.5 + a) - this.spacing * (a + 1) - o * n, c = 0; c < this.colCount; c++) {
var l = s + c + n * this.cacheRow, u = null;
if (l >= this.items.length) {
u = cc.instantiate(this.itemTemplate);
this.items.push(u);
this.content.addChild(u);
} else u = this.items[s + c];
var h = (c + .5) * this.itemWidth + this.spacing * (c + 1) - this.content.width / 2;
u.setPosition(h, r);
u.itemId = l;
if (l >= this.data.length) u.active = !1; else {
u.active = !0;
this.itemUpdateFunc(l, u, this.data[l]);
}
}
a++;
}
return !0;
},
getPositionInView: function(e) {
var t = e.parent.convertToWorldSpaceAR(e.position);
return this.scrollView.node.convertToNodeSpaceAR(t);
},
update: function(e) {
this.updateTimer += e;
if (this.isInit && !(this.updateTimer < this.updateInterval)) {
this.updateTimer = 0;
if (this.scrollView.content.y != this.lastContentPosY) {
for (var t = this.items, i = this.scrollView.content.y < this.lastContentPosY, n = (this.itemHeight + this.spacing) * this.cacheRow, o = 0, a = 0; a < t.length; a += this.colCount) {
var s = this.getPositionInView(t[a]);
if (i) {
o = t[a].y + n;
if (s.y < -this.bufferZone && o < 0) for (var r = 0; r < this.colCount; r++) {
var c = r + a;
t[c].y = o;
var l = t[c].itemId - this.spawnCount;
t[c].itemId = l;
if (l >= 0 && l < this.data.length) {
t[c].active = !0;
this.itemUpdateFunc(l, t[c], this.data[l]);
} else t[c].active = !1;
}
} else {
o = t[a].y - n;
if (s.y > this.bufferZone && o > -this.content.height) for (var u = 0; u < this.colCount; u++) {
var h = u + a;
t[h].y = o;
var d = t[h].itemId + this.spawnCount;
t[h].itemId = d;
if (d >= 0 && d < this.data.length) {
t[h].active = !0;
this.itemUpdateFunc(d, t[h], this.data[d]);
} else t[h].active = !1;
}
}
}
this.lastContentPosY = this.scrollView.content.y;
}
}
},
updateItems: function() {
var e = this;
this.items.forEach(function(t) {
var i = t.itemId;
e.data[i] && e.itemUpdateFunc(i, t, e.data[i]);
});
}
});
cc._RF.pop();
}, {} ],
uiSetting: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "a6b74+R6nxDnK80bI7CN4m2", "uiSetting");
cc.Class({
extends: e("uiWindowBase"),
properties: {},
start: function() {
this.initUI();
this.initMusic();
this.showHideInfo();
this.addEvents();
this.addPureVersionUI();
this.setIOSHideUI();
this.setOppoUI();
},
setIOSHideUI: function() {
if (cc.sys.os == cc.sys.OS_IOS && gCloundMgr.cIOSHide) {
this.btn_tixian.active = !1;
this.btn_dividend.active = !1;
this.flag_money_2.active = !1;
this.flag_money.active = !1;
}
},
setOppoUI: function() {
var e = this;
if (cc.sys.os != cc.sys.OS_IOS) {
if (4 == nativeData.getChannelCode()) {
this.node_oppo.active = !0;
this.unscheduleAllCallbacks();
if (gameData.gOppoCancelLoginTime > 0) {
this.img_quit_login.active = !1;
this.img_quit_login_cancel.active = !0;
var t = Math.floor(new Date().getTime() / 1e3), i = gameData.gOppoCancelLoginTime + 86400 - t, n = i;
if (i > 0) {
var o = util.ChangeTimeToSeconds(n, -1);
this.lbl_quick_login_calcel.getComponent(cc.Label).string = o + "后注销";
this.schedule(function() {
n -= 60;
var t = util.ChangeTimeToSeconds(n, -1);
e.lbl_quick_login_calcel.getComponent(cc.Label).string = t + "后注销";
if (n <= 0) {
gameData.set("gOppoCancelLoginTime", 0);
e.setOppoUI();
}
}, 60, i);
} else {
this.img_quit_login.active = !0;
this.img_quit_login_cancel.active = !1;
}
} else {
this.img_quit_login.active = !0;
this.img_quit_login_cancel.active = !1;
}
this.img_quit_login.quickBt(function() {
var t = Math.floor(new Date().getTime() / 1e3);
gameData.set("gOppoCancelLoginTime", t);
e.setOppoUI();
});
this.img_quit_login_cancel.quickBt(function() {
gameData.set("gOppoCancelLoginTime", 0);
e.setOppoUI();
});
}
}
},
addPureVersionUI: function() {
if (G_FRAME.YYB_VERSION) {
this.img_user.active = !0;
this.btn_invite.y = 78;
this.btn_privacy_policy.quickBt(function() {
UICtrl.openUI("uiFrame/uiFramePrivacypolicy");
});
this.btn_user_agreement.quickBt(function() {
UICtrl.openUI("uiFrame/uiFrameUserAgreement");
});
} else {
this.img_user.active = !1;
this.btn_invite.y = 45;
}
},
initUI: function() {
var e = this;
this.lbl_level.getComponent(cc.Label).string = gameData.gPlayerLevel;
this.lbl_ID.getComponent(cc.Label).string = gameData.userID;
this.lbl_name.getComponent(cc.Label).string = gameData.nickname || "游客";
gameData.headWeb && "" != gameData.headWeb && cc.loader.load({
url: gameData.headWeb,
type: "png"
}, function(t, i) {
t && console.error(t);
cc.isValid(e.node) && (e.img_head.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(i));
});
gameData.on("gMoney", function() {
e.lbl_money.getComponent(cc.Label).setNum(gameData.gMoney);
}, this.node);
var t = levelExpCsvData.getExp(gameData.gPlayerLevel);
this.img_player_exp.getComponent(cc.Sprite).fillRange = gameData.gPlayerExp / t;
this.img_server.quickBt(function() {
nativeData.checkAppInstalled("com.tencent.mobileqq") ? cc.sys.openURL(gCloundMgr.cCustomerLinkQQ) : cc.sys.openURL(gCloundMgr.cCustomerLink);
});
},
initMusic: function() {
var e = this;
this.btn_music_on.quickBt(function() {
e.setMusicOff();
}, !0);
this.btn_music_off.quickBt(function() {
e.setMusicOn();
}, !0);
this.btn_effect_on.quickBt(function() {
e.setEffectOff();
}, !0);
this.btn_effect_off.quickBt(function() {
e.setEffectOn();
}, !0);
if (1 == gameData.gMusic) {
this.btn_music_on.active = !0;
this.btn_music_off.active = !1;
} else {
this.btn_music_on.active = !1;
this.btn_music_off.active = !0;
}
if (1 == gameData.gEffect) {
this.btn_effect_on.active = !0;
this.btn_effect_off.active = !1;
} else {
this.btn_effect_on.active = !1;
this.btn_effect_off.active = !0;
}
},
setMusicOff: function() {
this.btn_music_on.active = !1;
this.btn_music_off.active = !0;
audioData.switchMusic(0);
},
setMusicOn: function() {
this.btn_music_on.active = !0;
this.btn_music_off.active = !1;
audioData.switchMusic(1);
},
setEffectOff: function() {
this.btn_effect_on.active = !1;
this.btn_effect_off.active = !0;
audioData.switchEffect(0);
},
setEffectOn: function() {
this.btn_effect_on.active = !0;
this.btn_effect_off.active = !1;
audioData.switchEffect(1);
},
addEvents: function() {
var e = this;
this.btn_close.quickBt(function() {
UICtrl.closeUI(e);
});
this.btn_invite.quickBt(function() {
UICtrl.closeUI(e);
gFriendGroupMgr.openView();
});
this.btn_tixian.quickBt(function() {
UICtrl.closeUI(e);
UICtrl.openUI("uiWithdrawal/uiWallet");
});
this.btn_dividend.quickBt(function() {
UICtrl.closeUI(e);
UICtrl.openUI("uiWindows/uiWindowDividendInfo");
});
this.node_head_touch.quickBt(function() {
if (cc.sys.os != cc.sys.OS_IOS || !gCloundMgr.cIOSHide) {
UICtrl.closeUI(e);
UICtrl.openUI("uiLevelRed/uiLevelRed");
}
});
this.img_node_1.quickBt(function() {
if (cc.sys.os != cc.sys.OS_IOS || !gCloundMgr.cIOSHide) {
UICtrl.closeUI(e);
UICtrl.openUI("uiLevelRed/uiLevelRed");
}
}, !0);
},
showHideInfo: function() {
var e = this;
this.hideClick = 1;
this.lbl_chanel_desc.active = !1;
this.img_title.onTouch(function() {
e.hideClick++;
if (5 == e.hideClick) {
e.lbl_chanel_desc.active = !0;
var t = nativeData.getOAID(), i = nativeData.getAndroidVersion(), n = nativeData.getChannelCode();
e.lbl_chanel_desc.getComponent(cc.Label).string += "本地渠道:" + n + "，实际渠道：" + gameData.gChannel;
e.lbl_chanel_desc.getComponent(cc.Label).string += "\nOAID:" + t;
e.lbl_chanel_desc.getComponent(cc.Label).string += "\nADVERSION:" + i;
e.lbl_chanel_desc.getComponent(cc.Label).string += "\n当前视频ID:" + nativeData.network_placement_id;
e.lbl_chanel_desc.getComponent(cc.Label).string += "\n当前版本:" + G_FRAME.VERSION;
}
});
},
onDestroy: function() {
gameData.off("gMoney", this.node);
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiShop: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "46f7cdtuGZHj5InEIr0yuQY", "uiShop");
cc.Class({
extends: e("uiWindowBase"),
properties: {},
start: function() {
this.initEvent();
this.initData();
},
initEvent: function() {
var e = this;
this.btn_close.quickBt(function() {
UICtrl.closeUI(e);
});
},
initData: function() {
var e = towerCsvData.getAllDatas(), t = Object.values(e);
this.node_scrollview.getComponent("uiScrollView").resetData(t, this.createItem.bind(this), 0);
},
createItem: function(e, t, i) {
var n = i.ID, o = towerCsvData.getPowerPerSceond(n), a = towerCsvData.getAttackNameByID(n), s = towerCsvData.getAttackSpedSecondByID(n), r = o.toBitString() + "/每秒", c = "L" + n, l = s + "/每秒";
t.lbl_speed.getComponent(cc.Label).string = l;
t.lbl_power.getComponent(cc.Label).string = r;
t.lbl_level.getComponent(cc.Label).string = c;
t.lbl_tower_name.getComponent(cc.Label).string = a;
var u = towerCsvData.getAttacIconByID(n);
util.display(t.img_tower, u);
gameData.gMaxTower >= n ? t.img_tower.color = cc.color(255, 255, 255) : t.img_tower.color = cc.color(0, 0, 0);
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiSignOnline: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "68389KjruBHApdQ0+n3RBDE", "uiSignOnline");
cc.Class({
extends: ui.baseLayer,
properties: {},
start: function() {
this.initOnline();
},
initOnline: function() {
var e = this, t = onLineMoneyCsvData.getAllDatas();
this.updateOnlineInitUI(t);
this.updateOnlineTime(t);
this.schedule(function() {
e.updateOnlineTime(t);
}, 1);
this.btn_online_unGet.quickBt(function() {
var i = e.btn_online_unGet.getIndex, n = t[i];
UICtrl.openUI("uiCommon/uiCommonMoney", function(t) {
t.initVideoExt(G_MONEY_FROM.ONLINE, G_VIDEO_FROM.ONLINE, n.reward_money, n.ex_reward, function() {
gameData.set("gDayOnlineMoney", i);
console.log("[在线红包]领取返回", gameData.gDayOnlineMoney);
e.updateOnlineBtn();
});
});
});
},
updateOnlineInitUI: function(e) {
for (var t = 1; t <= 4; t++) {
var i = e[t];
i.seconds = 60 * parseInt(i.online_min);
this["lbl_time_money_" + t].getComponent(cc.Label).string = i.reward_money;
this["lbl_time_noGet_" + t].getComponent(cc.Label).string = i.online_min + "分钟";
this["img_process_" + t].getComponent(cc.Sprite).fillRange = 0;
i.realTime = t <= 1 ? i.seconds : i.seconds - e[t - 1].seconds;
}
},
updateOnlineBtn: function() {
for (var e = 0, t = 1; t <= 4; t++) if (this["img_process_" + t].getComponent(cc.Sprite).fillRange >= 1) {
this["img_online_" + t].active = !0;
this["img_online_now_" + t].active = !1;
if (gameData.gDayOnlineMoney >= t) {
this["lbl_time_hasGet_" + t].active = !0;
this["lbl_time_noGet_" + t].active = !1;
} else {
this["lbl_time_hasGet_" + t].active = !1;
this["lbl_time_noGet_" + t].active = !0;
if (0 == e) {
e = t;
this["img_online_now_" + t].active = !0;
}
}
} else {
this["lbl_time_hasGet_" + t].active = !1;
this["lbl_time_noGet_" + t].active = !0;
}
console.log("[在线红包]有可领取的", e);
if (e > 0) {
this.btn_online_unGet.active = !0;
this.btn_online_toGet.active = !1;
this.btn_online_hasGet.active = !1;
this.btn_online_unGet.getIndex = e;
} else if (gameData.gDayOnlineMoney >= 4) {
this.btn_online_unGet.active = !1;
this.btn_online_toGet.active = !1;
this.btn_online_hasGet.active = !0;
} else {
this.btn_online_unGet.active = !1;
this.btn_online_toGet.active = !0;
this.btn_online_hasGet.active = !1;
}
},
updateOnlineTime: function(e) {
for (var t = 1; t <= 4; t++) {
var i = e[t];
if (!(gameData.gDayOnlineTime >= i.seconds)) {
var n = i.seconds - i.realTime, o = gameData.gDayOnlineTime - n, a = o / i.realTime, s = i.realTime - o;
this["img_process_" + t].getComponent(cc.Sprite).fillRange = a;
var r = util.ChangeTimeToSeconds(s, 2);
this.lbl_online_toGet.getComponent(cc.Label).string = r;
break;
}
this["img_process_" + t].getComponent(cc.Sprite).fillRange = 1;
t >= 4 && this.unscheduleAllCallbacks();
}
this.updateOnlineBtn();
}
});
cc._RF.pop();
}, {} ],
uiSign: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "ce9eeDvIsNPBaZzbnxPR5lC", "uiSign");
cc.Class({
extends: e("uiWindowBase"),
properties: {},
start: function() {
var e = this;
this.btn_close.quickBt(function() {
UICtrl.closeUI(e);
});
this.initSign();
webData.msgSendRecore(G_WINDOW_FROM.SIGN);
},
playSignBtnScale: function() {
var e = cc.scaleTo(.5, 1.05), t = cc.scaleTo(.5, .95), i = cc.sequence(e, t);
this.btn_sign.runAction(cc.repeatForever(i));
},
initSign: function() {
var e = this;
this.setDefaultSign();
var t = signCsvData.getAllDatas();
this.updateSignUI(t);
this.btn_toSign.quickBt(function() {
var i = e.btn_toSign.signIndex, n = t[i];
UICtrl.openUI("uiCommon/uiCommonMoney", function(o) {
o.initVideoExt(G_MONEY_FROM.SIGN, G_VIDEO_FROM.SIGN, n.num, n.ex_num, function() {
e.setCurrSign(i);
e.updateSignUI(t);
gFunctionMgr.addPlayerExp(G_EXP_FROM.SIGN);
UICtrl.closeUI(e);
});
});
});
},
updateSignUI: function(e) {
var t = gFunctionMgr.getOneStringToSplit(gameData.gSignDay);
console.log("[签到]上次签到的时间", t);
if (t) {
var i = parseInt(t[1]), n = parseInt(t[0]), o = (i + 1) % 7;
0 == o && (o = 7);
console.log("[签到]下一个签到的时间", o);
var a = e[o], s = !1;
util.checkSameDay(n) && (s = !0);
for (var r = 1; r <= 7; r++) {
var c = e[r];
this["lbl_sign_reward_" + r].getComponent(cc.Label).string = c.num;
o > r && this.setItemGray(r);
1 == o && i > 1 && s && this.setItemGray(r);
this["img_sign_light_" + r].active = o == r && !s;
}
if (s) {
this.btn_nextSign.active = !0;
this.btn_toSign.active = !1;
var l = parseInt(a.num) + parseInt(a.ex_num);
this.lbl_next_sign_money.getComponent(cc.Label).string = l;
console.log("[签到]今天签到过了", o);
} else {
this.btn_nextSign.active = !1;
this.btn_toSign.active = !0;
this.btn_toSign.signIndex = o;
console.log("[签到]今天没签过", o);
}
}
},
setItemGray: function(e) {
this["img_sign_icon_" + e].getComponent(cc.Sprite).setMaterial(0, cc.Material.getBuiltinMaterial("2d-gray-sprite"));
this["img_sign_bg_" + e].getComponent(cc.Sprite).setMaterial(0, cc.Material.getBuiltinMaterial("2d-gray-sprite"));
this["lbl_sign_reward_" + e].color = new cc.Color(81, 81, 81);
this["lbl_sign_tile_" + e].color = new cc.Color(81, 81, 81);
this["img_gou_" + e].active = !0;
},
setDefaultSign: function() {
if (!gameData.gSignDay) {
var e = gFunctionMgr.saveTwoStringToOne(0, 0);
gameData.set("gSignDay", e);
}
},
setCurrSign: function(e) {
var t = new Date().getTime(), i = gFunctionMgr.saveTwoStringToOne(t, e);
gameData.set("gSignDay", i);
},
onDestroy: function() {
gameData.send("moduleTipUpdate", G_WINDOW_FROM.SIGN);
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiSplash: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "ccecapdMIxMkq9twmv2A5l6", "uiSplash");
cc.Class({
extends: e("uiBaseLwAd"),
properties: {
_sucCallback: null,
_failCallback: null,
_bFinish: !1
},
onInit: function() {
var e = this;
this.scheduleOnce(function() {
e.btn_close.active = !0;
e.img_timer.active = !1;
}, 3);
this.scheduleOnce(function() {
e.lbl_timer.setLabel(1);
}, 2);
this.scheduleOnce(function() {
e.lbl_timer.setLabel(2);
}, 1);
}
});
cc._RF.pop();
}, {
uiBaseLwAd: "uiBaseLwAd"
} ],
uiTask: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "9aa39yZSQ9MaJsF+AAfzZG6", "uiTask");
cc.Class({
extends: e("uiWindowBase"),
properties: {
itemPrefab: cc.Prefab,
btnDuihuan: cc.SpriteFrame,
btnChoujiang: cc.SpriteFrame,
btnShare: cc.SpriteFrame
},
start: function() {
this._dailyGetNumber = 0;
this._achieveGetNumber = 0;
this._fenhongGetNumber = 0;
this.initData();
this.toogleSwitch(void 0, 1);
this.initEvent();
webData.msgSendRecore(G_WINDOW_FROM.TASK);
},
initEvent: function() {
var e = this;
this.btn_close.quickBt(function() {
UICtrl.closeUI(e);
});
},
toogleSwitch: function(e, t) {
console.log("TODO-uiTask-toogleSwitch()t=" + t);
for (var i = 1; i <= 3; i++) if (i == t) {
this["node_tab_" + i].active = !0;
this["tip_tab_" + i].opacity = 0;
} else {
this["node_tab_" + i].active = !1;
this["tip_tab_" + i].opacity = 255;
}
},
initData: function() {
var e = taskDailyCsvData.getAllDatas();
console.log("TODO-uiTask-initData()taskDailyCsvData.getAllDatas()=" + JSON.stringify(e));
for (var t in e) {
var i = e[t], n = cc.instantiate(this.itemPrefab);
n.parent = this.node_tab_1;
this.showDailyItem(n, i);
}
var o = taskAchieveCsvData.getAllDatas();
console.log("TODO-uiTask-initData()taskAchieveCsvData.getAllDatas()=" + JSON.stringify(o));
for (var a in o) {
var s = o[a], r = s.achieve_level, c = s.achieve_type;
if (r == gTipsMgr.getNowAchieveTaskComplete(c, r)) {
var l = cc.instantiate(this.itemPrefab);
l.parent = this.node_tab_2;
this.showAchieveItem(l, s);
}
}
var u = taskDivdendCsvData.getAllDatas();
console.log("TODO-uiTask-initData()taskDivdendCsvData.getAllDatas()=" + JSON.stringify(u));
for (var h in u) {
var d = u[h], g = cc.instantiate(this.itemPrefab);
g.parent = this.node_tab_3;
this.showDivdendItem(g, d);
}
this.updateTipUI();
this.updateLayoutZIndex();
},
showDailyItem: function(e, t) {
var i = this, n = t.ID, o = t.info, a = parseInt(t.reward_money), s = t.parm, r = gFunctionMgr.getDailyTaskState(n);
e.lbl_title.getComponent(cc.Label).string = o;
e._sName = o;
e.lbl_money.getComponent(cc.Label).string = a;
e.lbl_process.getComponent(cc.Label).string = r + "/" + s;
var c = r / s;
c > 1 && (c = 1);
e.img_process.getComponent(cc.Sprite).fillRange = c;
console.log("TODO-uiTask-showDailyItem()t=" + JSON.stringify(t) + " r=" + r + " gameData.gDayTaskComplete[n]=" + gameData.gDayTaskComplete[n]);
if (1 == gameData.gDayTaskComplete[n]) {
e.btn_hasGet.active = !0;
e.btn_toGet.active = !1;
e.btn_unAchieve.active = !1;
} else if (r >= s) {
e.btn_hasGet.active = !1;
e.btn_toGet.active = !0;
e.btn_unAchieve.active = !1;
this._dailyGetNumber++;
} else {
e.btn_hasGet.active = !1;
e.btn_toGet.active = !1;
e.btn_unAchieve.active = !0;
}
e.btn_toGet.quickBt(function() {
UICtrl.openUI("uiCommon/uiCommonMoney", function(o) {
o.initVideo(G_MONEY_FROM.DAILY, G_VIDEO_FROM.DAILY, a, function(o) {
if (o) {
gameData.gDayTaskComplete[n] = !0;
gameData.save("gDayTaskComplete");
gameData.plus("gAllCompleteDailyTask", 1);
i.showDailyItem(e, t);
gFunctionMgr.addPlayerExp(G_EXP_FROM.TASK);
dividendCsvData.addProcess(6);
i._dailyGetNumber--;
i.updateTipUI();
gFunctionMgr.getDailyTaskAchieveCount() >= gCloundMgr.cTurntableTaskMax && webData.msgCompleteTask();
}
});
});
});
if (1 == n) {
e.btn_unAchieve_light.active = !1;
e.btn_unAchieve_gray.active = !0;
} else {
e.btn_unAchieve_light.active = !0;
e.btn_unAchieve_gray.active = !1;
6 == n && (e.lbl_unAnchieve_light.getComponent(cc.Sprite).spriteFrame = this.btnShare);
}
e.btn_unAchieve.quickBt(function() {
console.log("TODO1-");
if (2 == n) {
i.setForceWindow(!1);
UICtrl.closeUI(i);
UICtrl.openUI("uiRoller/uiRoller");
} else if (3 == n) {
i.setForceWindow(!1);
UICtrl.closeUI(i);
gWordMgr.showTip("请拖动合成相同的炮塔");
} else if (4 == n) {
i.setForceWindow(!1);
UICtrl.closeUI(i);
G_NODE.QUICK_TOWER.openSupplyWindow();
} else if (5 == n) {
if (G_NODE.TIME_MONEY.clickNode()) {
i.setForceWindow(!1);
UICtrl.closeUI(i);
}
} else if (6 == n) {
UICtrl.closeUI(i);
gFriendGroupMgr.openView();
}
});
cc.sys.os == cc.sys.OS_IOS && gCloundMgr.cIOSHide && 1 == n && (e.lbl_title.getComponent(cc.Label).string = "累计击败BOSS");
},
showAchieveItem: function(e, t) {
var i = this, n = (t.ID, t.info), o = parseInt(t.reward_money), a = t.parm, s = t.achieve_type, r = t.achieve_level, c = gFunctionMgr.getAchieveTaskState(s);
e.lbl_title.getComponent(cc.Label).string = n;
e._sName = n;
e.lbl_money.getComponent(cc.Label).string = o;
e.lbl_process.getComponent(cc.Label).string = c + "/" + a;
var l = c / a;
l > 1 && (l = 1);
e.img_process.getComponent(cc.Sprite).fillRange = l;
if (c >= a) {
e.btn_hasGet.active = !1;
e.btn_toGet.active = !0;
e.btn_unAchieve.active = !1;
this._achieveGetNumber++;
} else {
e.btn_hasGet.active = !1;
e.btn_toGet.active = !1;
e.btn_unAchieve.active = !0;
}
e.btn_toGet.quickBt(function() {
UICtrl.openUI("uiCommon/uiCommonMoney", function(t) {
t.initVideo(G_MONEY_FROM.ACHIEVE, G_VIDEO_FROM.ACHIEVE, o, function(t) {
if (t) {
gameData.gAllTaskComplete[s] = r;
gameData.save("gAllTaskComplete");
var n = gTipsMgr.getNowAchieveTaskComplete(s, r), o = taskAchieveCsvData.getTaskIDByTypeLevel(s, n);
o && o.achieve_type == s ? i.showAchieveItem(e, o) : e.active = !1;
i._achieveGetNumber--;
i.updateTipUI();
}
});
});
});
if (4 == s) {
e.btn_unAchieve_light.active = !1;
e.btn_unAchieve_gray.active = !0;
} else {
e.btn_unAchieve_light.active = !0;
e.btn_unAchieve_gray.active = !1;
}
e.btn_unAchieve.quickBt(function() {
if (5 == s) {
i.setForceWindow(!1);
UICtrl.closeUI(i);
gWordMgr.showTip("请拖动合成相同的炮塔");
} else if (6 == s) {
i.setForceWindow(!1);
UICtrl.closeUI(i);
UICtrl.openUI("uiRoller/uiRoller");
} else if (7 == s) {
i.setForceWindow(!1);
UICtrl.closeUI(i);
gFriendGroupMgr.openView();
}
});
cc.sys.os == cc.sys.OS_IOS && gCloundMgr.cIOSHide && 4 == s && (e.lbl_title.getComponent(cc.Label).string = "累计击败BOSS");
},
showDivdendItem: function(e, t) {
var i = this, n = t.ID, o = t.info, a = t.parm;
e.img_money.active = !1;
e.lbl_title.getComponent(cc.Label).string = o;
e._sName = o;
e.lbl_money.getComponent(cc.Label).string = 1;
var s = 0;
if (1 == n) {
e.img_tower.active = !0;
s = gameData.gMaxTower;
} else if (2 == n) {
e.img_tower.active = !0;
s = gMainMgr.getDividendPrpcess();
} else if (3 == n) {
e.img_roller.active = !0;
s = gameData.gMaxTower;
gameData.gNextDivdendTaskLevel || gameData.set("gNextDivdendTaskLevel", a);
a = gameData.gNextDivdendTaskLevel;
} else if (4 == n) {
e.img_tower.active = !0;
s = Math.floor(gameData.gMoney / 1e4);
}
e.lbl_process.getComponent(cc.Label).string = s + "/" + a;
var r = s / a;
r > 1 && (r = 1);
e.img_process.getComponent(cc.Sprite).fillRange = r;
if (s >= a) {
e.btn_hasGet.active = !1;
e.btn_toGet.active = !0;
e.btn_unAchieve.active = !1;
this._fenhongGetNumber++;
} else {
e.btn_hasGet.active = !1;
e.btn_toGet.active = !1;
e.btn_unAchieve.active = !0;
}
if (4 == n) {
e.btn_unAchieve_light.active = !1;
e.btn_unAchieve_gray.active = !0;
} else {
e.btn_unAchieve_light.active = !0;
e.btn_unAchieve_gray.active = !1;
}
if (2 == n) {
var c = parseFloat((s / 100).toFixed(4));
e.lbl_process.getComponent(cc.Label).string = c + "%";
}
if (3 == n) {
e.lbl_toGet.getComponent(cc.Sprite).spriteFrame = this.btnChoujiang;
e.lbl_title.getComponent(cc.Label).string = "解锁" + a + "级炮抽炮王";
}
if (4 == n) {
e.lbl_unAnchieve_gray.getComponent(cc.Sprite).spriteFrame = this.btnDuihuan;
e.lbl_process_yuan.active = !0;
}
e.btn_toGet.quickBt(function() {
if (3 == n) {
i.setForceWindow(!1);
UICtrl.closeUI(i);
UICtrl.openUI("uiRoller/uiRoller2");
} else 4 == n && gWordMgr.showTip("账号等级达到68级可提现");
});
e.btn_unAchieve.quickBt(function() {
if (1 == n || 3 == n) {
i.setForceWindow(!1);
UICtrl.closeUI(i);
gWordMgr.showTip("请拖动合成相同的炮塔");
} else if (2 == n) {
i.setForceWindow(!1);
UICtrl.closeUI(i);
UICtrl.openUI("uiWindows/uiWindowDividendFrom");
}
});
},
updateTipUI: function() {
console.log("[任务]刷新tip", this._dailyGetNumber, this._achieveGetNumber);
this._dailyGetNumber > 0 ? this.tip_tab_1.active = !0 : this.tip_tab_1.active = !1;
this._achieveGetNumber > 0 ? this.tip_tab_2.active = !0 : this.tip_tab_2.active = !1;
this._fenhongGetNumber > 0 ? this.tip_tab_3.active = !0 : this.tip_tab_3.active = !1;
},
updateLayoutZIndex: function() {
this.updateZindex(this.node_tab_1);
this.updateZindex(this.node_tab_2);
this.updateZindex(this.node_tab_3);
},
updateZindex: function(e) {
var t = e.getChildren();
for (var i in t) {
var n = t[i];
n.btn_toGet.active ? n._sOrder = 3 : n.btn_hasGet.active ? n._sOrder = 1 : n._sOrder = 2;
}
t.sort(function(e, t) {
return e._sOrder < t._sOrder ? 1 : -1;
});
for (var o in t) {
t[o]._sIndex = o;
}
for (var a in t) {
var s = t[a];
s.setSiblingIndex(s._sIndex);
}
},
onDestroy: function() {
gameData.send("moduleTipUpdate", G_WINDOW_FROM.TASK);
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiTip2: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "e211eFbDQlMx7UswEkB+LUP", "uiTip2");
var n;
function o(e, t, i) {
t in e ? Object.defineProperty(e, t, {
value: i,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = i;
return e;
}
var a = cc.Enum((o(n = {}, 1, "有几率增加已签到次数"), o(n, 2, "可获得更多红包"), n));
cc.Class({
extends: ui.baseDlg,
properties: {},
start: function() {},
initScript: function(e) {
var t = this;
this.lbl_desc_2.getComponent(cc.Label).string = a[e];
var i = cc.delayTime(1.2), n = cc.moveBy(.5, cc.v2(0, 20)), o = cc.fadeOut(.5), s = cc.callFunc(function() {
UICtrl.closeUI(t);
}), r = cc.spawn(o, n), c = cc.sequence(i, r, s);
this.node.runAction(c);
}
});
cc._RF.pop();
}, {} ],
uiTip: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "455baYnjHZDk7JDZXAnzu7r", "uiTip");
cc.Class({
extends: ui.baseDlg,
properties: {},
start: function() {},
initScript: function(e) {
var t = this;
this.lbl_desc.getComponent(cc.Label).string = e;
this.scheduleOnce(function() {
var e = t.lbl_desc.getContentSize().width;
t.img_bg.setContentSize(cc.size(e + 90, 80));
t.img_bg.active = !0;
});
var i = cc.delayTime(1.2), n = cc.moveBy(.5, cc.v2(0, 100)), o = cc.fadeOut(.5), a = cc.callFunc(function() {
UICtrl.closeUI(t);
}), s = cc.spawn(o, n), r = cc.sequence(i, s, a);
this.node.runAction(r);
}
});
cc._RF.pop();
}, {} ],
uiTowerBox: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "aa7e1uwnjtN0ofycfSZrnBX", "uiTowerBox");
cc.Class({
extends: ui.baseLayer,
properties: {
_tOrder: 0
},
start: function() {},
initScript: function(e) {
this._tOrder = e.tOrder;
var t = G_COM.PATH_LIST[e.tOrder];
this.node.position = t;
this.playFall(e);
},
playFall: function(e) {
var t = this, i = cc.v2(0, 1500);
this.node_fall.position = i;
if (1 == e.tType) {
gameData.plus("gPowerDrop", 1);
gameData.gOwnTower[e.tOrder] = e.tValue;
gameData.set("gOwnTower", gameData.gOwnTower);
this.img_box_ani.active = !0;
} else {
if (2 == e.tType) {
gameData.gOwnMoney[-e.tOrder] = e.tValue;
gameData.save("gOwnMoney");
} else {
gameData.gOwnMoney[e.tOrder] = e.tValue;
gameData.save("gOwnMoney");
}
this.img_money_ani.active = !0;
}
var n = cc.moveTo(1, cc.v2(0, 10));
this.node.canTouch = !1;
var o = cc.callFunc(function() {
t.node.canTouch = !0;
1 == e.tType && t.img_box_ani.getComponent(cc.Animation).play("yaohuang");
}), a = cc.delayTime(5), s = cc.callFunc(function() {
if (1 == e.tType) {
t.img_box_ani.getComponent(cc.Animation).play("kaiqi");
t.img_box_ani.inOpen = !0;
}
}), r = cc.delayTime(.2), c = cc.callFunc(function() {
t.playOpen(e);
});
this.node_fall.runAction(cc.sequence(n, o, a, s, r, r, c));
this.node.quickBt(function() {
if (1 == e.tType) {
if (!t.img_box_ani.inOpen) {
t.node_fall.stopAllActions();
t.img_box_ani.getComponent(cc.Animation).play("kaiqi");
t.scheduleOnce(function() {
t.playOpen(e);
}, .2);
}
} else 2 == e.tType ? UICtrl.openUI("uiCommon/uiCommonMoney", function(i) {
i.initNormal(G_MONEY_FROM.DROP, e.tValue, function() {
t.removeBox(e.tOrder);
delete gameData.gOwnMoney[-e.tOrder];
gameData.save("gOwnMoney");
});
}) : 3 == e.tType && UICtrl.openUI("uiCommon/uiCommonMoney", function(i) {
i.initVideo(G_MONEY_FROM.DROP, G_VIDEO_FROM.DROP, e.tValue, function(i) {
if (i) {
t.removeBox(e.tOrder);
delete gameData.gOwnMoney[e.tOrder];
gameData.save("gOwnMoney");
}
});
});
});
},
playOpen: function(e) {
if (1 == e.tType) {
this.removeBox(e.tOrder);
var t = e.tValue;
gTowerMgr.createTowerInPos(t, void 0, e.tOrder);
} else e.tType;
},
removeBox: function(e) {
gTowerMgr.removeBoxInOrder(e);
}
});
cc._RF.pop();
}, {} ],
uiTower: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "6a635gZOzZHrLbJyj17ZJEY", "uiTower");
var n = 0, o = 1, a = 2;
cc.Class({
extends: ui.baseLayer,
properties: {
_tType: 0,
_tID: 0,
_tOrder: 0,
_tSpeed: 100,
_tRange: 300,
_tPower: 10,
_tCrit: 0,
_tBones: 1,
_tIfRota: !0,
_tAppearPos: void 0,
_tFlyState: !1,
_tTarget: void 0,
_tTimePlus: 0,
_bType: 1,
inputLog: !1,
_tStop: !1,
_tLastTarget: void 0,
_beginAttack: !1,
_tSound: !1
},
start: function() {},
initGhostConfig: function(e) {
console.log("TODO-uiTower-initGhostConfig()", this._tID, this._tOrder, e.tID, e.tOrder);
this._tType = a;
this._beginAttack = !1;
this._tID = e.tID;
this._tOrder = e.tOrder;
this._tRange = towerCsvData.getAttackRgeByID(this._tID);
this._tBones = towerCsvData.getDragonBonesID(this._tID);
this._tIfRota = !1;
this._dragonBones = this.node_dragon.getComponent(dragonBones.ArmatureDisplay);
this.initLevel();
this.initPos();
this.initBones();
this.initRangeUI();
},
initMainConfig: function(e) {
console.log("TODO-uiTower-initMainConfig()", this._tID, this._tOrder, e.tID, e.tOrder);
G_COM.STOP_GAME && (this._tStop = !0);
this._tType = o;
this._beginAttack = !0;
this._tID = e.tID;
this._tOrder = e.tOrder;
this._tSpeed = towerCsvData.getAttackSpdByID(this._tID);
this._tRange = G_COM.FULL_RANGE;
this._tPower = towerCsvData.getAttackPowByID(this._tID);
this._tBones = towerCsvData.getDragonBonesID(this._tID);
this._tIfRota = towerCsvData.getAttackIfRotaByID(this._tID);
this._tCrit = towerCsvData.getAttacCritByID(this._tID);
this._bType = bulletCsvData.getBulletType(this._tBones);
this._dragonBones = this.node_dragon.getComponent(dragonBones.ArmatureDisplay);
this.initLevel();
this.initBones();
this.initTouch();
this.initFaceUpdate();
this.node.position = G_POS.P_MAIN_TOWER;
this._tSound = !0;
},
initConfig: function(e) {
console.log("TODO-uiTower-initConfig()", this._tID, this._tOrder, e.tID, e.tOrder);
G_COM.STOP_GAME && (this._tStop = !0);
this._tType = n;
this._tID = e.tID;
this._tOrder = e.tOrder;
this._tAppearPos = e.tAppearPos;
this._tSpeed = towerCsvData.getAttackSpdByID(this._tID);
this._tRange = towerCsvData.getAttackRgeByID(this._tID);
this._tPower = towerCsvData.getAttackPowByID(this._tID);
this._tIfRota = towerCsvData.getAttackIfRotaByID(this._tID);
this._tBones = towerCsvData.getDragonBonesID(this._tID);
this._tCrit = towerCsvData.getAttacCritByID(this._tID);
this._bType = bulletCsvData.getBulletType(this._tBones);
this.inputLog && console.log("[创建塔]", this._tOrder, this._tID);
this._dragonBones = this.node_dragon.getComponent(dragonBones.ArmatureDisplay);
this.initBones();
this.initLevel();
this.initTouch();
this.initFaceUpdate();
if (e.tAppearPos) this.flayToPos(); else {
this.initPos();
this._beginAttack = !0;
this.attack();
}
if (e.tCombineEff) {
this._beginAttack = !1;
this.playCombineEffect();
this.getCombineMoney();
}
if (e.tCombineEffOnly) {
this._beginAttack = !1;
this.playCombineEffect();
}
if (gTowerMgr.getSoundTower() < 4) {
gTowerMgr.addSoundTower();
this._tSound = !0;
}
},
initBones: function() {
var e = "tower/pao" + this._tBones + "/pao" + this._tBones + "_ske", t = "tower/pao" + this._tBones + "/pao" + this._tBones + "_tex";
this._dragonBones.dragonAsset = cc.loader.getRes(e, dragonBones.DragonBonesAsset);
this._dragonBones.dragonAtlasAsset = cc.loader.getRes(t, dragonBones.DragonBonesAtlasAsset);
this._dragonBones.armatureName = "armatureName";
},
initLevel: function() {
console.log("TODO-uiTower-initLevel()", this._tID);
this.lbl_level.getComponent(cc.Label).string = this._tID;
},
flayToPos: function() {
var e = this;
this.node.position = this._tAppearPos;
this._tFlyState = !0;
this.node.scale = 0;
var t = G_COM.PATH_LIST[this._tOrder], i = cc.moveTo(.5, t), n = cc.scaleTo(.1, 2), o = cc.scaleTo(.4, 1), a = cc.callFunc(function() {
e._tFlyState = !1;
e._beginAttack = !0;
e.attack();
}), s = cc.sequence(n, o, a), r = cc.spawn(s, i);
this.node.runAction(r);
},
initPos: function() {
var e = gTowerMgr.getTowerPos(this._tOrder);
this.node.position = e;
},
initTouch: function() {
this.node.on(cc.Node.EventType.TOUCH_START, this.touchStart.bind(this));
this.node.on(cc.Node.EventType.TOUCH_MOVE, this.touchMove.bind(this));
this.node.on(cc.Node.EventType.TOUCH_END, this.touchEnd.bind(this));
this.node.on(cc.Node.EventType.TOUCH_CANCEL, this.touchEnd.bind(this));
},
initFaceUpdate: function() {
var e = this;
this.schedule(function() {
e._tTarget && cc.isValid(e._tTarget) && e.changeFace(e._tTarget);
}, .1);
},
attack: function() {
if (!this._tStop) {
var e = this._tRange, t = gMonsterMgr.getMonsterList(), i = void 0, n = 1e3, o = this.node.position;
for (var a in t) {
var s = t[a], r = s.position, c = o.sub(r).mag();
if (c < e && c < n) {
n = c;
i = s;
}
}
if (cc.isValid(this._tTarget)) {
var l = this._tTarget.position;
o.sub(l).mag() < e && (i = this._tTarget);
}
if (i && cc.isValid(i)) {
this._tTarget = i;
if (this._bType == G_BULLET.LIGHT || this._bType == G_BULLET.LASER) {
if (this._tLastTarget != this._tTarget) {
this._tLastTarget = this._tTarget;
this._dragonBones.playAnimation("newAnimation", 1);
}
} else this._dragonBones.playAnimation("newAnimation", 1);
var u = this._tPower, h = !1, d = this._tCrit;
if (d > 0) {
if (util.randomRange(1, 100) <= d) {
u *= 2;
h = !0;
this.inputLog && console.log("[触发暴击]", u, d, gBuffMgr._shopCritUP);
}
}
this._tSound && !gFreeLotteryMgr.getInLotteryPage() && audioData.playSoundByID(3);
this.moveToFace(this._tTarget);
gBulletMgr.createBullet(this._tBones, this.node.position, i, {
tPower: u,
tCrit: h,
tSpeed: this._tSpeed
});
}
}
},
touchStart: function() {
this._tFlyState || (this._tType != o ? this._tType == n && this.createMineGhost() : gTowerMgr.showTowerInfo(this._tID, -1));
},
touchMove: function(e) {
if (this._tType == n) {
var t = e.getLocation(), i = util.worldConvertLocalPointAR(this.node.parent, t);
if (!(gGuideMgr.inGuide() && gGuideMgr.inGuide() && G_POS.B_GUIDE) || G_POS.B_GUIDE.contains(i)) {
var o = -1;
if (cc.isValid(this.ghostTower)) {
this.ghostTower.position = i;
o = gMapMgr.getOrderByPos(this.ghostTower.position);
}
gTowerMgr.checkMoveOver(o, this._tOrder, this._tID);
}
}
},
touchEnd: function() {
if (this._tType != o) {
if (this._tType == n) {
var e = -1, t = cc.v2(0, 0);
if (cc.isValid(this.ghostTower)) {
e = gMapMgr.getOrderByPos(this.ghostTower.position);
t = this.ghostTower.position;
this.ghostTower.destroy();
this.ghostTower = null;
}
this.node.opacity = 255;
gTowerMgr.checkMoveOpera(e, this._tOrder, this._tID, t);
}
} else gTowerMgr.hideTowerInfo();
},
touchCancel: function() {
gTowerMgr.hideTowerInfo();
if (this._tType == n) {
if (cc.isValid(this.ghostTower)) {
this.ghostTower.destroy();
this.ghostTower = null;
}
this.node.opacity = 255;
}
},
changeFace: function(e) {
if (this._tIfRota) {
var t = e.position.sub(this.node.position), i = cc.v2(0, 1), n = cc.v2(t).signAngle(i), o = cc.misc.radiansToDegrees(n);
this.node_dragon.angle = -o;
}
},
moveToFace: function(e) {
if (this._tIfRota) {
var t = e.position.sub(this.node.position), i = cc.v2(0, 1), n = cc.v2(t).signAngle(i), o = cc.misc.radiansToDegrees(n), a = cc.rotateTo(.1, o);
this.node_dragon.runAction(a);
}
},
createMineGhost: function() {
var e = this;
this.node.opacity = 200;
gTowerMgr.createGhostTower(this._tID, this._tOrder, function(t) {
e.ghostTower = t;
});
},
initRangeUI: function() {},
checkLightSameID: function(e) {
if (-1 != e) if (e == this._tID) {
this.node_sameID.active = !0;
var t = cc.scaleTo(1, 1.2), i = cc.scaleTo(1, 1), n = cc.repeatForever(cc.sequence(t, i));
this.node_dragon.runAction(n);
this.node_sameID.runAction(n);
} else this.node_dragon.opacity = 150; else {
this.node_sameID.active = !1;
this.node_dragon.stopAllActions();
this.node_dragon.stopAllActions();
this.node_dragon.opacity = 255;
}
},
playCombineEffect: function() {
var e = this;
UICtrl.createUI("prefab/uiObjects/uiCombineEffect", function(t) {
if (cc.isValid(e.node)) {
t.parent = e.node;
t.getComponent("uiCombineEffect").initEffect(e._tID - 1);
}
});
this.node_tower.active = !1;
this.scheduleOnce(function() {
if (cc.isValid(e.node)) {
e.node_tower.active = !0;
e._beginAttack = !0;
}
}, .5);
},
getCombineMoney: function() {
var e = this;
gameData.plus("gDayCombineTime", 1);
gameData.plus("gAllCombineTime", 1);
gFunctionMgr.addPlayerExp(G_EXP_FROM.COMBINE, gameData.gDayCombineTime);
if (!this.openGameMoneyBox()) {
gFunctionMgr.openFullScreenVideo();
var t = gameData.gDayCombineTime % gCloundMgr.cRanMoneyTime, i = gameData.gMaxTower >= gCloundMgr.cRanMoneyLevel;
if (0 == t && i && gameData.gDayRanMoney < gCloundMgr.cRanMoneyMax) {
var n = towerCsvData.getRandomMoney(this._tID);
UICtrl.openUI("uiCommon/uiCommonMoney", function(e) {
e.initVideo(G_MONEY_FROM.RANDOM, G_VIDEO_FROM.COMBINE, n, function(e) {
e && gameData.plus("gDayRanMoney", 1);
gFunctionMgr.addPlayerExp(G_EXP_FROM.RANDOM_MONEY, gameData.gDayRanMoney);
});
});
console.log("[今日合成次数累计]看视频", gameData.gDayRanMoney);
} else {
var o = towerCsvData.getCombineMoney(this._tID);
gameData.gDayCombineTime > gCloundMgr.cCombineFree && (o = Math.floor(o * gCloundMgr.cAfterLimitCombine));
o = Math.floor(o * gCloundMgr.cCombineMoneyRate);
webData.msgSaveMoney(G_MONEY_FROM.COMBINE, o, function() {
gWealthMgr.createTowerEffect(e.node, o);
console.log("[今日合成次数累计]", gameData.gDayCombineTime);
});
}
dividendCsvData.addProcess(3);
}
},
openGameMoneyBox: function() {
var e = gCloundMgr.cShowMoneyBoxCombine[0], t = gCloundMgr.cShowMoneyBoxCD[0];
if (gameData.gOnFirstDay) {
e = gCloundMgr.cShowMoneyBoxCombine[0];
t = gCloundMgr.cShowMoneyBoxCD[0];
} else {
e = gCloundMgr.cShowMoneyBoxCombine[1];
t = gCloundMgr.cShowMoneyBoxCD[1];
}
var i = gameData.gDayCombineTime % e;
if (0 != i) {
console.log("[宝箱红包]次数不足", gameData.gDayCombineTime, e, i);
return !1;
}
if (!(gameData.gMaxTower < gCloundMgr.cShowMoneyBoxLevel)) {
var n = new Date().getTime();
if (gameData.gOpenMoneyTime && n - gameData.gOpenMoneyTime < 1e3 * t) {
console.log("[宝箱红包]弹出宝箱CD中", n, gameData.gOpenMoneyTime, Math.floor((n - gameData.gOpenMoneyTime) / 1e3), t);
return !1;
}
if (gameData.gDayOpenGameBoxVideo >= gCloundMgr.cShowMoneyBoxVideoLimit) {
console.log("[宝箱红包]达到宝箱领取上限", gameData.gDayOpenGameBoxVideo, gCloundMgr.cShowMoneyBoxVideoLimit);
return !1;
}
if (gameData.gDayOpenGameBox >= gCloundMgr.cShowMoneyBoxShowLimit) {
console.log("[宝箱红包]达到宝箱弹出上限", gameData.gDayOpenGameBox, gCloundMgr.cShowMoneyBoxShowLimit);
return !1;
}
gameData.set("gOpenMoneyTime", n);
console.log("TODO-uiTower-openGameMoneyBox()");
// UICtrl.openUI("uiWindows/uiWindowMoneyBox");
return !0;
}
console.log("[宝箱红包]等級不夠", gameData.gMaxTower, gCloundMgr.cShowMoneyBoxLevel);
},
getID: function() {
return this._tID;
},
getOrder: function() {
return this._tOrder;
},
update: function(e) {
if (!this._tStop && this._beginAttack) {
this._tTimePlus += e;
var t = this._tSpeed;
gBuffMgr._inSpdUPBuff && (t /= 2);
if (this._tTimePlus >= t) {
this._tTimePlus = 0;
this.attack();
}
}
},
onDestroy: function() {
this._tSound && gTowerMgr.delSoundTower();
},
stopGame: function() {
this._tStop = !0;
this.node.pauseAllActions();
this._dragonBones.armature()._animation && this._dragonBones.armature()._animation.stop();
},
resumeGame: function() {
this._tStop = !1;
this.node.resumeAllActions();
}
});
cc._RF.pop();
}, {} ],
uiTurntable: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "93fb0F35gRJC7jUQXirfAFT", "uiTurntable");
cc.Class({
extends: e("uiWindowBase"),
properties: {},
start: function() {
var e = this;
this.btn_close.quickBt(function() {
e.closeSelf();
});
this.item_0.quickBt(function() {
e.beginLottery();
});
this.btn_wallet.quickBt(function() {
e._inRunning ? gWordMgr.showTip("请等待转动结束") : e.toWallet();
});
this.lbl_down_description.quickBt(function() {
if (e._inRunning) gWordMgr.showTip("请等待转动结束"); else {
UICtrl.closeUI(e);
UICtrl.openUI("uiTurntable/uiTurntableTip");
}
});
this.node_navigate_3.quickBt(function() {
if (e._inRunning) gWordMgr.showTip("请等待转动结束"); else {
UICtrl.closeUI(e);
gFriendGroupMgr.openView();
}
}, !0);
this.node_navigate_2.quickBt(function() {
if (e._inRunning) gWordMgr.showTip("请等待转动结束"); else {
UICtrl.closeUI(e);
UICtrl.openUI("uiTask/uiTask");
}
}, !0);
this.node_navigate_4.quickBt(function() {
if (e._inRunning) gWordMgr.showTip("请等待转动结束"); else {
UICtrl.closeUI(e);
UICtrl.openUI("uiLevelRed/uiLevelRed");
}
}, !0);
this.initUI();
this.initData();
this.initTurnTable();
webData.msgSendRecore(G_WINDOW_FROM.TURNTABLE);
},
initUI: function() {
util.setHead(this.img_head, this, gameData.headWeb);
this.lbl_level.getComponent(cc.Label).string = "L" + gameData.gPlayerLevel;
},
closeSelf: function() {
this._inRunning ? gWordMgr.showTip("请等待转动结束") : this.closeToNode(G_NODE.HALL.btn_turntable);
},
initData: function() {
this._inRunning = !1;
this._currShowTab = 0;
this._turntableConfig = pageData.getTurntable();
this._turntableInfo = webData.getturntableInfo();
this._turntableMoney = this._turntableInfo.Red;
this._turntableTime = [ parseInt(this._turntableInfo.LevelNum), parseInt(this._turntableInfo.TaskNum), parseInt(this._turntableInfo.InviteNum), parseInt(this._turntableInfo.SuperNum) ];
this._turntableLastTower = this._turntableInfo.LevelStage;
this._turntableVideoTime = this._turntableInfo.SuperVideoCount;
this._turntableSuperGet = this._turntableInfo.SuperType;
this.updateMoneyUI();
this.updateCondtion();
var e = gTurntableMgr.getDefaultIndex();
this.showTab(e);
},
initTurnTable: function() {
var e = this;
this.btn_task_1.quickBt(function() {
e.showTab(1);
}, !0);
this.btn_task_2.quickBt(function() {
e.showTab(2);
}, !0);
this.btn_task_3.quickBt(function() {
e.showTab(3);
}, !0);
this.btn_task_4.quickBt(function() {
e.showTab(4);
}, !0);
},
updateCondtion: function() {
var e = gFunctionMgr.getDailyTaskAchieveCount(), t = gCloundMgr.cTurntableTaskMax, i = gameData.gMaxTower, n = this._turntableLastTower, o = this._turntableVideoTime, a = gCloundMgr.cTurntableVideoMax, s = gameData.gPlayerLevel, r = gCloundMgr.cTurntableLevelMax, c = gCloundMgr.cTurntableSunLevel, l = "#F1301C";
i >= n && this._turntableTime[0] > 0 && (l = "#4CB930");
var u = "#F1301C";
e >= t && this._turntableTime[1] > 0 && (u = "#4CB930");
var h = "<color=#6F4E09>炮塔等级达到(</c><color=" + l + ">" + i + "/" + n + "</color><color=#6F4E09>)级可抽奖<br/>炮塔72级时每天免费抽5次</c>";
this.lbl_condition_1.getComponent(cc.RichText).string = h;
var d = "<color=#6F4E09>完成全部(</c><color=" + u + ">" + e + "/" + t + "</color><color=#6F4E09>)个日常任务</c>";
this.lbl_condition_2.getComponent(cc.RichText).string = d;
var g = "<color=#6F4E09>邀请1个徒弟,且徒弟账号等级<br/>达到" + c + "级</c>";
this.lbl_condition_3.getComponent(cc.RichText).string = g;
if (1 == this._turntableSuperGet) {
var f = "<color=#6F4E09>账号等级达到(</c><color=#F1301C>" + s + "/" + r + "</color><color=#6F4E09>)级可抽奖</c>";
this.lbl_condition_4.getComponent(cc.RichText).string = f;
} else {
var p = "<color=#6F4E09>累计观看(</c><color=#F1301C>" + o + "/" + a + "</color><color=#6F4E09>)视频可抽奖</c>";
this.lbl_condition_4.getComponent(cc.RichText).string = p;
this.node_navigate_4.active = !1;
}
for (var m = 1; m <= 4; m++) {
var _ = m - 1;
if (this._turntableTime[_] > 0) {
this["lbl_runtime_" + m].active = !0;
this["lbl_runtime_" + m].getComponent(cc.Label).string = this._turntableTime[_];
this["img_tip_" + m].active = !0;
} else {
this["lbl_runtime_" + m].active = !1;
this["img_tip_" + m].active = !1;
}
}
},
toWallet: function() {
	var e = this;
	this.btn_wallet.canTouch = !1;
	pageData.msgTurntableWithdraw(this._turntableMoney, function(t) {
		if (cc.isValid(e.node)) {
			if (t.success) {
				var i = t.jsonresult;
				e._turntableMoney = e._turntableMoney - parseInt(i);
				e.updateMoneyUI();
				e.updateCondtion();
				gWordMgr.showTip(t.msg, 1);
			} else gWordMgr.showTip(t.msg, 1);
			e.scheduleOnce(function() {
				e.btn_wallet.canTouch = !0;
			}, .3);
		}
	}, function() {
	e.btn_wallet.canTouch = !0;
	});
},
toWallet2: function() {
var e = this;
if (this._turntableMoney < 3e3) gWordMgr.showTip("您当前金额不足0.3元，无法提现"); else if (!gVideoTipMgr.cVideoTouchBeforeWallet || gameData.gDayWalletVideoTip[G_WALLET_WAY.TURNTABLE]) {
this.btn_wallet.canTouch = !1;
pageData.msgTurntableWithdraw(this._turntableMoney, function(t) {
if (cc.isValid(e.node)) {
if (t.success) {
var i = t.jsonresult;
e._turntableMoney = e._turntableMoney - parseInt(i);
e.updateMoneyUI();
e.updateCondtion();
gWordMgr.showTip(t.msg, 1);
} else gWordMgr.showTip(t.msg, 1);
e.scheduleOnce(function() {
e.btn_wallet.canTouch = !0;
}, .3);
}
}, function() {
e.btn_wallet.canTouch = !0;
});
} else UICtrl.openUI("uiVideoTip/uiVideoTipWallet2", function(e) {
e.init(G_WALLET_WAY.TURNTABLE);
});
},
updateMoneyUI: function() {
this.lbl_down_money.getComponent(cc.Label).string = this._turntableMoney / 1e4;
},
showTab: function(e) {
if (this._inRunning) gWordMgr.showTip("请等待转动结束"); else if (this._currShowTab != e) {
this._currShowTab = e;
this.resetItemLight();
for (var t = 1; t <= 4; t++) {
var i = this._turntableConfig[t];
if (e == t) {
this.showTabByConfig(i);
this["btn_task_light_" + t].active = !0;
} else this["btn_task_light_" + t].active = !1;
}
var n = this._turntableTime[this._currShowTab - 1];
this.img_count_bg.active = n > 0;
}
},
showTabByConfig: function(e) {
for (var t in e.money) {
var i = parseInt(e.money[t]);
this["item_" + (parseInt(t) + 1)].item_money.getComponent(cc.Label).string = i / 1e4;
}
this.item_flag_1.active = !1;
this.item_flag_2.active = !1;
this.item_flag_3.active = !1;
this.item_tip_1.active = !1;
this.item_tip_2.active = !1;
this.item_tip_3.active = !1;
this.item_tip_light_1.active = !1;
this.item_tip_light_2.active = !1;
this.item_tip_light_3.active = !1;
for (var n in e.fakeRate) {
var o = parseInt(n) + 1, a = e.fakeRate[n];
this["item_flag_" + o].active = !0;
this["item_tip_" + o].active = !0;
this["item_tip_light_" + o].active = !0;
this["lbl_flag_" + o].getComponent(cc.Label).string = a[0] + "%-" + a[1] + "%";
}
},
beginLottery: function() {
var e = this;
if (this._inRunning) gWordMgr.showTip("请等待转动结束"); else {
var t = this._turntableTime[this._currShowTab - 1];
if (2 == this._currShowTab && gameData.gDayGetTaskMoney) gWordMgr.showTip("今日已抽完，请明日再来"); else if (t <= 0) {
gWordMgr.showTip("条件不满足，无法抽奖");
this.playLabelShake(this._currShowTab);
} else webData.msgRunTurntable(this._currShowTab, function(t, i) {
e._inRunning = !0;
e._turntableTime[e._currShowTab - 1] -= 1;
gTurntableMgr.setLessTurntableTime(e._turntableTime);
2 == e._currShowTab && gameData.set("gDayGetTaskMoney", !0);
e.beginRun(t, function() {
e._inRunning = !1;
console.log("[转动结束]", t, i);
e._turntableMoney += parseInt(i);
e.updateMoneyUI();
UICtrl.closeUI(e);
UICtrl.openUI("uiCommon/uiCommonMoneyGet", function(e) {
e.initTurntableMoney(i);
});
});
});
}
},
beginRun: function(e, t) {
console.log("[摇到了]", e);
this.createRunConfig(e);
this.toRunByConfig(t);
},
createRunConfig: function(e) {
this._currIndex = 0;
this._ranConfig = [];
for (var t = 1, i = 8 - e + 1 + 32, n = Math.floor(2 * i / 3), o = 1; o <= i; o++) {
var a = {}, s = o % 8;
0 == s && (s = 8);
t = o <= n ? 8 * t / 10 : 10 * t / 8;
a.index = 8 - s + 1;
a.time = Math.floor(1e3 * t) / 1e3;
this._ranConfig.push(a);
}
console.log("[转动时间配置]", this._ranConfig);
},
toRunByConfig: function(e) {
var t = this, i = this._ranConfig[this._currIndex];
if (i) {
this._currIndex++;
var n = i.time, o = i.index;
audioData.playSoundByID(22);
this.scheduleOnce(function() {
t.showItemLight(o);
t.toRunByConfig(e);
}, n);
} else {
audioData.playSoundByID(21);
e && e();
}
},
showItemLight: function(e) {
this.resetItemLight();
for (var t = 1; t <= 8; t++) t == e && (this["item_" + t].item_light.active = !0);
},
resetItemLight: function() {
for (var e = 1; e <= 8; e++) this["item_" + e].item_light.active = !1;
},
playLabelShake: function(e) {
var t = this["lbl_condition_" + e];
t.stopAllActions();
t.x = this.originX || t.x;
this.originX = this.originX || t.x;
t.runAction(cc.repeat(cc.sequence(cc.moveBy(.07, cc.v2(-15, 0)), cc.moveBy(.07, cc.v2(15, 0))), 3));
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiUpdate: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "27f751/usZHRLOhb4aBrA/s", "uiUpdate");
var n = e("uiHotUpdate");
cc.Class({
extends: n,
properties: {
_lastPro: {
default: 0,
type: cc.Integer
},
nodeUpdate: cc.Prefab
},
start: function() {},
onUpdate: function(e) {
(e = parseInt(e)) >= 100 && (e = 100);
e <= 0 && (e = 0);
e < this._lastPro && (e = this._lastPro);
this._lastPro = e;
if (!(e <= 5)) {
if (!this.updateNode) {
this.updateNode = cc.instantiate(this.nodeUpdate);
this.updateNode.parent = this.node;
}
console.log("热更新中", e, e / 100);
this.updateNode.img_process.getComponent(cc.Sprite).fillRange = e / 100;
this.updateNode.lbl_process.getComponent(cc.Label).string = e + "%";
}
}
});
cc._RF.pop();
}, {
uiHotUpdate: "uiHotUpdate"
} ],
uiVideoTipAfterVideo: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "468f79x1vNP/askWKPZBFi7", "uiVideoTipAfterVideo");
cc.Class({
extends: e("uiWindowBase"),
properties: {},
start: function() {
var e = this;
this.btn_close.quickBt(function() {
UICtrl.closeUI(e);
});
this.btn_direct.quickBt(function() {
UICtrl.closeUI(e);
});
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiVideoTipLevelUP: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "f9d636Ad/NMBYiyLCD5BROH", "uiVideoTipLevelUP");
cc.Class({
extends: e("uiWindowBase"),
properties: {},
start: function() {
var e = this;
this.btn_close.quickBt(function() {
UICtrl.closeUI(e);
});
this.btn_direct.quickBt(function() {
UICtrl.closeUI(e);
});
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiVideoTipWallet2: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "bc64858r6JPkoUFgwA0DNcQ", "uiVideoTipWallet2");
cc.Class({
extends: e("uiWindowBase"),
properties: {},
start: function() {},
init: function(e) {
var t = this, i = gameData.get("gDayWalletVideoTip");
i[e] = !0;
gameData.set("gDayWalletVideoTip", i);
this.btn_close.quickBt(function() {
UICtrl.closeUI(t);
});
this.btn_direct.quickBt(function() {
UICtrl.closeUI(t);
shareData.toVideo(function(e) {
webData.msgSaveVideo(G_VIDEO_FROM.VIDEO_TIP, function() {}, e);
});
});
this.lbl_son_number_title.quickBt(function() {
UICtrl.closeUI(t);
shareData.toVideo(function(e) {
webData.msgSaveVideo(G_VIDEO_FROM.VIDEO_TIP, function() {}, e);
});
}, !0);
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiVideoTipWallet: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "fc24deI3q9DT5Bh293c/1cw", "uiVideoTipWallet");
cc.Class({
extends: e("uiWindowBase"),
properties: {},
start: function() {},
init: function(e) {
var t = this;
this.btn_close.quickBt(function() {
UICtrl.closeUI(t);
});
this.btn_direct.quickBt(function() {
e && e();
UICtrl.closeUI(t);
});
this.btn_video.quickBt(function() {
shareData.toVideo(function(i) {
webData.msgSaveVideo(G_VIDEO_FROM.MONEY_SIGN, function() {
e && e();
UICtrl.closeUI(t);
}, i);
});
});
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiWXLogin: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "a02d5jop/lGRZeV0QqZSui+", "uiWXLogin");
cc.Class({
extends: ui.baseNode,
properties: {},
start: function() {
cc.sys.os == cc.sys.OS_IOS ? this.showIOSUI() : this.showAndroidUI();
this.resizeHall();
},
resizeHall: function() {
var e = cc.Canvas.instance.node.getContentSize();
this.node.setContentSize(e);
this.node_game_view.setContentSize(e);
},
showIOSUI: function() {
var e = this;
this.node_android.active = !1;
this.node_ios.active = !0;
this.btn_login_ios.quickBt(function() {
e.loginToWX();
e.unenableButton();
});
this.btn_login_tourist.quickBt(function() {
webData.toLoginGameTourist();
});
if (gCloundMgr.cIOSHide) {
this.btn_login_tourist.active = !0;
this.btn_login_ios.active = !1;
this.btn_login_tourist.y = -150;
} else {
this.btn_login_tourist.active = !1;
this.btn_login_ios.active = !0;
this.btn_login_ios.y = -150;
}
},
showAndroidUI: function() {
var e = this;
this.node_android.active = !0;
this.node_ios.active = !1;
this.btn_login.quickBt(function() {
if (!G_FRAME.YYB_VERSION || e.img_gou.active) {
e.loginToWX();
e.unenableButton();
} else e.openPolicy();
});
this.img_user.active = !1;
this.setPureVersionUI();
},
setPureVersionUI: function() {
var e = this;
if (G_FRAME.YYB_VERSION) {
this.node_android.getComponent(cc.Widget).bottom = 450;
this.img_user.active = !0;
this.img_kuang.quickBt(function() {
e.img_gou.active ? e.img_gou.active = !1 : e.img_gou.active = !0;
});
this.btn_privacy_policy.quickBt(function() {
UICtrl.openUI("uiFrame/uiFramePrivacypolicy");
});
this.btn_user_agreement.quickBt(function() {
UICtrl.openUI("uiFrame/uiFrameUserAgreement");
});
gameData.readValue("openPolicyWindow") || this.openPolicy();
}
},
openPolicy: function() {
var e = this;
UICtrl.openUI("uiFrame/uiFramePolicy", function(t) {
t.initScript(function() {
e.img_gou.active = !0;
}, function() {
e.img_gou.active = !1;
});
});
},
unenableButton: function() {
var e = this;
this.btn_login.canTouch = !1;
this.btn_login.getComponent(cc.Sprite).setMaterial(0, cc.Material.getBuiltinMaterial("2d-gray-sprite"));
this.scheduleOnce(function() {
e.btn_login.canTouch = !0;
e.btn_login.getComponent(cc.Sprite).setMaterial(0, cc.Material.getBuiltinMaterial("2d-spine"));
}, 4);
},
loginToWX: function() {
nativeData.loginWX();
}
});
cc._RF.pop();
}, {} ],
uiWalletDes: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "8e835mZAxVBt71oyBprdUGH", "uiWalletDes");
cc.Class({
extends: e("uiWindowBase"),
properties: {},
start: function() {
var e = this;
this.btn_close.quickBt(function() {
UICtrl.closeUI(e);
});
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiWalletItem: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "8b65efgnARHILoRxfnMwHZ7", "uiWalletItem");
cc.Class({
extends: ui.baseNode,
properties: {},
start: function() {},
init: function(e, t) {
this.lbl_amount_normal.setLabel("<b>" + e + "</b>");
this.lbl_amount_select.setLabel("<b>" + e + "</b>");
var i = Number(e * t).toFixed(2);
this.lbl_amount_real.setLabel("<b>实际到账" + i + "元</b>");
},
setSelect: function(e) {
if (e) {
this.node_normal.active = !1;
this.node_select.active = !0;
} else {
this.node_normal.active = !0;
this.node_select.active = !1;
}
}
});
cc._RF.pop();
}, {} ],
uiWalletRecord: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "2a5234bh7VBLIgiKsAAgYk/", "uiWalletRecord");
var n;
function o(e, t, i) {
t in e ? Object.defineProperty(e, t, {
value: i,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = i;
return e;
}
var a = (o(n = {}, 1, {
desc: "审核中",
color: "#D6362E"
}), o(n, 2, {
desc: "审核成功",
color: "#1A9E24"
}), o(n, 3, {
desc: "审核失败",
color: "#D6362E"
}), n);
cc.Class({
extends: e("uiWindowBase"),
properties: {},
start: function() {
var e = this;
this.btn_close.quickBt(function() {
UICtrl.closeUI(e);
});
this._currPageMax = 0;
this._pageIndex = 1;
this.addListen();
this.initData();
},
addListen: function() {
this.node_scrollview.on("scroll-to-bottom", this.onScrollToBottom, this);
},
onScrollToBottom: function() {
if (this._currPageMax < 7) console.log("当前页面返回不足7个，说明没有更多余额明细了", this._currPageMax); else {
this._currPageMax = 0;
this._pageIndex++;
this.initData();
}
},
initData: function() {
var e = this;
pageData.msgGetSmallChangeLog(this._pageIndex, function(t) {
if (cc.isValid(e.node)) {
e._currPageMax = t.length;
e.insertData(t);
e._currPageMax <= 0 && 1 == e._pageIndex && (e.img_no_record_icon.active = !0);
}
}, function() {
e._currPageMax = 0;
e._currPageMax <= 0 && 1 == e._pageIndex && (e.img_no_record_icon.active = !0);
});
},
insertData: function(e) {
for (var t in e) this.createItem(e[t]);
},
createItem: function(e) {
var t = cc.instantiate(this.node_RecordItem);
t.active = !0;
t.parent = this.node_items;
var i = (e.changeRedMoney / 1e4).toFixed(2);
if (e.changeRedMoney > 0) {
i = "￥ +" + i;
t.lbl_income.color = new cc.color().fromHEX("#46780B");
} else {
i = "￥ " + i;
t.lbl_income.color = new cc.color().fromHEX("#D6363E");
}
t.lbl_title.getComponent(cc.Label).string = e.remark;
t.lbl_income.getComponent(cc.Label).string = i;
t.lbl_time.getComponent(cc.Label).string = e.opTime;
t.btn_ckxq.quickBt(function() {
UICtrl.openUI("uiFriendGroup/uiFriendGroupWalletRecordDetails", function(t) {
t.initData(e.title);
});
});
if (e.title && "" != e.title) {
t.btn_ckxq.active = !0;
t.lbl_status.active = !1;
} else {
t.btn_ckxq.active = !1;
if (e.state) {
t.lbl_status.active = !0;
t.lbl_status.setLabel(a[e.state].desc);
t.lbl_status.color = new cc.color().fromHEX(a[e.state].color);
} else t.lbl_status.active = !1;
}
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiWallet: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "08978+8hcBOhKMd3hJNXlIQ", "uiWallet");
cc.Class({
extends: e("uiWindowBase"),
properties: {
grayBtn: cc.SpriteFrame,
grayBtnSelect: cc.SpriteFrame,
moneyItem: cc.Prefab
},
start: function() {
this._tConfig = {};
this._tGetYet = {};
this._tSelectIndex = 0;
this._tMiniIndex = 1;
this._quickSignFull = !1;
this._tItemList = {};
this.addEvents();
this._initData();
this._initListen();
webData.msgSendRecore(G_WINDOW_FROM.TIXIAN);
},
addEvents: function() {
var e = this;
this.btn_dividend.quickBt(function() {
console.log("TODO-uiWallet-addEvents()-btn_dividend");
UICtrl.openUI("uiWindows/uiWindowDividendInfo");
});
this.btn_close.quickBt(function() {
console.log("TODO-uiWallet-addEvents()-btn_close");
UICtrl.closeUI(e);
});
this.btn_withdraw.quickBt(function() {
console.log("TODO-uiWallet-addEvents()-btn_withdraw");
e.withdrawalApplication();
});
this.btn_hasSignMoney.quickBt(function() {
console.log("TODO-uiWallet-addEvents()-btn_hasSignMoney");
gWordMgr.showTip("今日已签到");
});
this.btn_des.quickBt(function() {
console.log("TODO-uiWallet-addEvents()-btn_des");
UICtrl.openUI("uiWithdrawal/uiMoneyDes");
});
this.btn_signMoney.quickBt(function() {
console.log("TODO-uiWallet-addEvents()-btn_signMoney");
e.img_toSignVideo.active ? shareData.toVideo(function(t) {
if (e.lbl_toSignVideo.active) {
gameData.plus("gWalletFiveSignTime", 1);
if (gameData.gWalletFiveSignTime < gCloundMgr.cMoneyWalletSign[1]) {
e.lbl_toSignVideo.getComponent(cc.Label).string = "(" + gameData.gWalletFiveSignTime + "/" + gCloundMgr.cMoneyWalletSign[1] + ")";
return;
}
gameData.set("gWalletFiveSignTime", 0);
}
webData.msgSaveVideo(G_VIDEO_FROM.MONEY_SIGN, function() {
e.toMoneySign();
}, t);
}) : e.toMoneySign();
});
this.btn_record.quickBt(function() {
console.log("TODO-uiWallet-addEvents()-btn_record");
UICtrl.openUI("uiWithdrawal/uiMoneyRecord");
});
this.btn_toSign.quickBt(function() {
console.log("TODO-uiWallet-addEvents()-btn_toSign");
var t = e.btn_toSign.signIndex;
t >= 3 ? shareData.toVideo(function(i) {
webData.msgSaveVideo(G_VIDEO_FROM.MONEY_CLOCK, function() {
e.toSignThisDay(t);
}, i);
}) : e.toSignThisDay(t);
});
this.btn_sign.quickBt(function() {
console.log("TODO-uiWallet-addEvents()-btn_sign");
gWordMgr.showTip("今日已打卡，请明天再来");
});
},
toMoneySign: function() {
var e = this;
webData.msgToSignMoney(function() {
gameData.plus("gSignMoney", 1);
var t = Math.floor(new Date().getTime() / 1e3);
gameData.set("gSignMoneyTime", t);
e.showRequire();
var i = e._tConfig[e._tSelectIndex];
gameData.gSignMoney < i.signCount ? gWordMgr.showTip("已签到成功,请明天继续签到") : gWordMgr.showTip("已签到成功,您可以提现了");
}, function() {
gWordMgr.showTip("今日已签到");
});
},
_initData: function() {
var e = this;
pageData.msgGetRedPackConfig(function(t) {
if (cc.isValid(e.node)) {
console.log("msgGetRedPackConfig", t);
e._tConfig = t.result;
e._tGetYet = t.getHistory;
e._initSelectIndex();
e._initMoneyList();
e.setDefaultSign();
e._updateLayout();
}
});
},
_initSelectIndex: function() {
for (var e in this._tConfig) {
var t = this._tConfig[e].id;
if (!this._tGetYet[t]) {
this._tSelectIndex = e;
return;
}
}
},
_initListen: function() {
var e = this;
gameData.on("gMoney", function(t) {
if (cc.isValid(e.node)) {
e.lbl_game_money.getComponent(cc.Label).string = t;
e.lbl_real_money.getComponent(cc.Label).string = "≈" + Math.floor(t / 100) / 100 + "元";
}
}, this.node);
},
_initMoneyList: function() {
var e = this, t = function() {
var t = e._tConfig[i], n = cc.instantiate(e.moneyItem);
if (t.amount < 2e3) {
n.parent = e.layout_quick_money;
n.flag_new.active = !0;
} else {
n.parent = e.layout_money;
n.flag_new.active = !1;
}
1 != t.sort && 0 == t.signCount && (e._quickSignItem = n);
e._tItemList[t.id] = n;
t._item = n;
if (1 != t.sort && 0 == t.signCount) {
n.flag_new.active = !1;
n.flag_quick_sign.active = !0;
} else n.flag_quick_sign.active = !1;
e.setBtnGray(t.id);
n._itemOrder = parseInt(i);
var o = t.amount / 100;
n.lbl_money.getComponent(cc.Label).string = o;
n.lbl_money_select.getComponent(cc.Label).string = o;
n.quickBt(function() {
if (e._tSelectIndex != n._itemOrder) {
e._tSelectIndex = n._itemOrder;
e._switchTiXianIndex();
}
});
};
for (var i in this._tConfig) t();
this._switchTiXianIndex();
},
_switchTiXianIndex: function() {
for (var e in this._tItemList) {
var t = this._tItemList[e];
if (t._itemOrder == this._tSelectIndex) {
t.img_money_select.active = !0;
this.showRequire();
} else t.img_money_select.active = !1;
}
},
_updateLayout: function() {
var e = this.layout_quick_money.childrenCount;
this.node_tixian.y = e > 3 ? -160 : -60;
},
withdrawalApplication: function() {
var e = this, t = this._tConfig[this._tSelectIndex], i = t.id;
console.log("TODO-uiWallet-withdrawalApplication()-_tSelectIndex=" + this._tSelectIndex + " t=" + JSON.stringify(t));
if (1 == t.id || 0 != t.signCount) if (this._tGetYet[i]) {
gWordMgr.showTip("该金额只能提现一次", 1);
gWordMgr.showTip2(1);
} else if (gameData.gMoney < 100 * t.amount) {
gWordMgr.showTip("金额不足，无法提现", 1);
gWordMgr.showTip2(2);
} else if (0 == t.txlimitid || this._tGetYet[t.txlimitid]) {
if (gameData.gMoney - gameData.gNowDropMoney < 100 * t.amount) {
gWordMgr.showTip("提现请求中，请稍后再试...", 1);
gWordMgr.showTip2(1);
} else if (t.signCount > 0 && gameData.gSignMoney < t.signCount) {
gWordMgr.showTip("签到次数不足，无法提现", 1);
gWordMgr.showTip2(1);
this.playLabelShake();
} else if (t.videoCountLimit > 0 && gameData.gAllVideoCount < t.videoCountLimit) {
gWordMgr.showTip("视频次数不足，无法提现", 1);
gWordMgr.showTip2(1);
this.playLabelShake();
} else {
var n = gVideoTipMgr.getIsShowVideoTipWalletFull();
t.sort <= 3 && n ? UICtrl.openUI("uiVideoTip/uiVideoTipWallet", function(t) {
t.init(function() {
e.toWallet(i);
});
}) : this.toWallet(i);
}
} else {
var o = "请先提现" + this.getMoneyByID(t.txlimitid) + "元";
gWordMgr.showTip(o);
gWordMgr.showTip2(1);
} else {
if (this._tGetYet[i]) {
gWordMgr.showTip("该金额只能提现一次", 1);
gWordMgr.showTip2(1);
return;
}
if (!this._quickSignFull) {
gWordMgr.showTip("打卡次数不足，无法提现");
return;
}
if (gameData.gMoney < 100 * t.amount) {
gWordMgr.showTip("金额不足，无法提现", 1);
gWordMgr.showTip2(2);
return;
}
if (0 != t.txlimitid && !this._tGetYet[t.txlimitid]) {
var a = "请先提现" + this.getMoneyByID(t.txlimitid) + "元";
gWordMgr.showTip(a);
gWordMgr.showTip2(1);
return;
}
this.toWallet(i, !0);
}
},
toWallet: function(e, t) {
var i = this;
this.btn_withdraw.canTouch = !1;
pageData.msgTryWithdraw(e, function(n) {
if (cc.isValid(i.node)) {
if (n.success) {
pageData._moneyConfig && (pageData._moneyConfig.getHistory[e] = !0);
i._tGetYet[e] = !0;
gameData.plus("gMoney", -100 * n.jsonresult);
i.setBtnGray(e);
if (!t) {
gameData.gSignMoney = 0;
gameData.gSignMoneyTime = 0;
}
i._tSelectIndex++;
i._switchTiXianIndex();
gWordMgr.showTip(n.msg, 1);
G_NODE.HALL.updateMoneyUI(0);
30 == parseInt(n.jsonresult) && nativeData.showIOSComent();
} else gWordMgr.showTip(n.msg, 1);
i.scheduleOnce(function() {
i.btn_withdraw.canTouch = !0;
}, .3);
}
}, function() {});
},
showRequire: function() {
var e = this._tConfig[this._tSelectIndex];
if (1 == e.id || 0 != e.signCount) {
this.img_sign_banner.active = !1;
this.node_way.active = !1;
this.btn_signMoney.active = !1;
this.btn_hasSignMoney.active = !1;
this.lbl_tixian_level_2.active = !1;
if (!(this._tGetYet[e.id] || gameData.gMoney < 100 * e.amount)) {
this.node_way.active = !0;
if (0 == e.txlimitid || this._tGetYet[e.txlimitid]) if (e.signCount > 0 && gameData.gSignMoney < e.signCount) {
this.lbl_tixian_level.getComponent(cc.Label).string = "需签到" + e.signCount + "次,已签到" + gameData.gSignMoney + "/" + e.signCount;
if (0 == gameData.gSignMoney) {
this.btn_signMoney.active = !0;
this.btn_hasSignMoney.active = !1;
this.lbl_toSignMoney.active = !0;
this.img_toSignVideo.active = !1;
this.lbl_toSignVideo.active = !1;
} else if (util.checkSameDay(1e3 * gameData.gSignMoneyTime)) {
this.btn_signMoney.active = !1;
this.btn_hasSignMoney.active = !0;
} else {
this.btn_signMoney.active = !0;
this.btn_hasSignMoney.active = !1;
this.img_toSignVideo.active = !0;
if (50 == e.amount) {
if (gFunctionMgr.getDailyVideoTimes() >= gCloundMgr.cMoneyWalletSign[0]) this.lbl_toSignVideo.active = !1; else {
this.lbl_toSignVideo.active = !0;
this.lbl_toSignVideo.getComponent(cc.Label).string = "(" + gameData.gWalletFiveSignTime + "/" + gCloundMgr.cMoneyWalletSign[1] + ")";
}
}
}
} else if (e.videoCountLimit > 0 && gameData.gAllVideoCount < e.videoCountLimit) this.lbl_tixian_level.getComponent(cc.Label).string = "需视频次数达到" + e.videoCountLimit + "次,当前" + gameData.gAllVideoCount + "次"; else if (e.accountlevel > 0 || e.accountlevel > 0 || e.unionlevel > 0) {
e.invitecount > 0 && (this.lbl_tixian_level.getComponent(cc.Label).string = "邀请" + e.invitecount + "个玩家且均达到" + e.tdlevellimit + "级");
e.unionlevel > 0 && (this.lbl_tixian_level.getComponent(cc.Label).string = "家族等级达到" + e.unionlevel + "级,当前" + gFriendGroupMgr.groupLevel + "级");
if (e.accountlevel > 0) if (e.unionlevel > 0 || e.invitecount > 0) {
this.lbl_tixian_level_2.active = !0;
this.lbl_tixian_level_2.getComponent(cc.Label).string = "您账号等级达到" + e.accountlevel + "级,当前" + gameData.gPlayerLevel + "级";
} else {
this.lbl_tixian_level_2.active = !1;
this.lbl_tixian_level.getComponent(cc.Label).string = "邀请" + e.invitecount + "个玩家且均达到" + e.tdlevellimit + "级";
}
} else if (e.levelLimit && e.levelLimit > 0 && gameData.gMaxTower < e.levelLimit) {
this.lbl_tixian_level.active = !0;
this.lbl_tixian_level.getComponent(cc.Label).string = "您炮塔等级需达到" + e.levelLimit + "级,当前" + gameData.gMaxTower + "级";
this.lbl_tixian_level_2.active = !1;
} else {
this.lbl_tixian_level.getComponent(cc.Label).string = "满足条件";
this.lbl_tixian_level_2.active = !1;
} else this.node_way.active = !1;
}
} else this.showRequireQuick();
},
showRequireQuick: function() {
this.img_sign_banner.active = !1;
this.node_way.active = !1;
var e = this._tConfig[this._tSelectIndex];
if (this._tGetYet[e.id]) this._quickSignItem.flag_quick_sign.active = !1; else {
this.img_sign_banner.active = !0;
var t = gFunctionMgr.getOneStringToSplit(gameData.gSignQuick);
if (t) {
console.log("[签到]上次签到的时间", t);
var i = parseInt(t[1]);
if (i >= 15) {
this._quickSignFull = !0;
if (gameData.gMoney < 100 * e.amount) {
this.img_sign_banner.active = !1;
return;
}
if (0 != e.txlimitid && !this._tGetYet[e.txlimitid]) {
this.img_sign_banner.active = !1;
return;
}
this.btn_sign.active = !1;
this.btn_toSign.active = !1;
this._quickSignItem.flag_quick_sign.active = !1;
this.lbl_quick_sign_day.getComponent(cc.Label).string = "邀请" + e.invitecount + "个玩家且均达到" + e.tdlevellimit + "级";
this.lbl_quick_sign_day_2.getComponent(cc.Label).string = "您账号等级达到" + e.accountlevel + "级,当前" + gameData.gPlayerLevel + "级";
} else {
this._quickSignFull = !1;
this.lbl_quick_sign_day.getComponent(cc.Label).string = "需打卡15次,已打卡" + i + "/15";
this.lbl_quick_sign_day_2.active = !1;
this._quickSignItem.flag_quick_sign.active = !0;
var n = parseInt(t[0]), o = !1;
util.checkSameDay(n) && (o = !0);
var a = i + 1;
if (o) {
this.btn_sign.active = !0;
this.btn_toSign.active = !1;
this._quickSignItem.flag_quick_sign.active = !1;
} else {
this.btn_sign.active = !1;
this.btn_toSign.active = !0;
this.btn_toSign.signIndex = a;
if (a >= 3) {
this.img_toQuickVideo.active = !0;
this.lbl_toQuickMoney.x = 15;
} else {
this.img_toQuickVideo.active = !1;
this.lbl_toQuickMoney.x = 0;
}
}
}
}
}
},
setBtnGray: function(e) {
if (this._tGetYet[e]) {
var t = this._tItemList[e];
t.node_normal.getComponent(cc.Sprite).spriteFrame = this.grayBtn;
t.img_money_select.getComponent(cc.Sprite).spriteFrame = this.grayBtnSelect;
t.lbl_money_select.color = new cc.color().fromHEX("#C6924E");
t.lbl_money.color = new cc.color().fromHEX("#C6924E");
t.lbl_money_select.getComponent(cc.LabelOutline).color = new cc.color().fromHEX("#C6924E");
t.lbl_money.getComponent(cc.LabelOutline).color = new cc.color().fromHEX("#C6924E");
t.lbl_unit_1.color = new cc.color().fromHEX("#C6924E");
t.lbl_unit_2.color = new cc.color().fromHEX("#C6924E");
t.flag_new.active = !1;
t.flag_one.active = !1;
}
},
playLabelShake: function() {
this.lbl_tixian_level.stopAllActions();
this.lbl_tixian_level.x = this.originX || this.lbl_tixian_level.x;
this.originX = this.originX || this.lbl_tixian_level.x;
this.lbl_tixian_level.runAction(cc.repeat(cc.sequence(cc.moveBy(.07, cc.v2(-15, 0)), cc.moveBy(.07, cc.v2(15, 0))), 3));
},
toSignThisDay: function(e) {
this.setCurrSign(e);
this.showRequireQuick();
gWordMgr.showTip("打卡成功");
},
setCurrSign: function(e) {
var t = new Date().getTime(), i = gFunctionMgr.saveTwoStringToOne(t, e);
gameData.set("gSignQuick", i);
},
getMoneyByID: function(e) {
for (var t in this._tConfig) {
var i = this._tConfig[t];
if (i.id == e) return parseInt(i.amount) / 100;
}
return 0;
},
setDefaultSign: function() {
if (this._quickSignItem && cc.isValid(this._quickSignItem)) {
if (!gameData.gSignQuick) {
var e = gFunctionMgr.saveTwoStringToOne(0, 0);
gameData.set("gSignQuick", e);
}
var t = gFunctionMgr.getOneStringToSplit(gameData.gSignQuick), i = parseInt(t[1]);
this._quickSignItem.flag_quick_sign.active = i < 15;
var n = parseInt(t[0]), o = !1;
util.checkSameDay(n) && (o = !0);
o && (this._quickSignItem.flag_quick_sign.active = !1);
}
},
onDestroy: function() {
gameData.off("gMoney", this.node);
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiWinEnd: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "f4e38Qgb59BnpYBRV7bBQ84", "uiWinEnd");
cc.Class({
extends: ui.baseLayer,
properties: {
logo_fail: cc.SpriteFrame,
logo_sucs: cc.SpriteFrame,
logo_bossSucs: cc.SpriteFrame
},
onEnable: function() {
gMainMgr.stopGame();
},
onDisable: function() {
gMainMgr.resumeGame();
},
start: function() {
this.runAppearAction();
},
initFail: function() {
this.img_logo.getComponent(cc.Sprite).spriteFrame = this.logo_fail;
},
initSucs: function() {
this.img_logo.getComponent(cc.Sprite).spriteFrame = this.logo_sucs;
},
initBossSucs: function() {
this.img_logo.getComponent(cc.Sprite).spriteFrame = this.logo_bossSucs;
},
runAppearAction: function() {
var e = this, t = cc.fadeTo(.5, 255), i = cc.moveTo(.5, cc.v2(0, 100)), n = cc.spawn(t, i), o = cc.delayTime(.5), a = cc.fadeTo(.5, 50), s = cc.moveTo(.5, cc.v2(0, 1e3)), r = cc.spawn(a, s), c = cc.callFunc(function() {
gMainMgr.enterNextChapter();
e.node.destroy();
});
this.node_move.runAction(cc.sequence(n, o, r, c));
}
});
cc._RF.pop();
}, {} ],
uiWindowBase: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "cfc78Tm3cRE1IV/ecbB+meu", "uiWindowBase");
cc.Class({
extends: ui.baseDlg,
properties: {
showBanner: !1,
showFeed: !1
},
start: function() {},
onEnable: function() {
console.log("TODO-uiWindowBase-onEnable()1", gCloundMgr.cHideHuaWei, this.showBanner, this.showFeed);
if (gCloundMgr.cHideHuaWei) {
this.showBanner = !1;
this.showFeed = !1;
} else {
if (this.showBanner && !gWindowMgr.isInBannerCD()) {
console.log("TODO-uiWindowBase-onEnable()2", gCloundMgr.cHideHuaWei, this.showBanner, this.showFeed);
gWindowMgr.toBannerCD();
gWindowMgr.toShowBanner();
}
if (this.showFeed) {
if (util.randomRange(1, 100) <= gCloundMgr.cWindowFeedToBanner) {
console.log("TODO-uiWindowBase-onEnable()3", gCloundMgr.cWindowFeedToBanner, this.showBanner, this.showFeed);
this.node.getComponent(cc.Widget).bottom = 600;
gWindowMgr.toShowFeed();
} else {
console.log("TODO-uiWindowBase-onEnable()4", gCloundMgr.cWindowFeedToBanner, this.showBanner, this.showFeed);
this.node.getComponent(cc.Widget).bottom = 600;
gWindowMgr.toShowBanner();
}
}
}
},
toShowInsertVideo: function() {
if (!this._forceWindow) {
var e = util.randomRange(1, 100);
console.log("TODO-uiWindowBase-toShowInsertVideo()", e);
e = 999999;
console.log("[弹出插屏]1判断", e, gCloundMgr.cVideoInsertRate);
if (!(e > gCloundMgr.cVideoInsertRate)) {
console.log("[弹出插屏]2判断", gameData.gDayInvVideo, gCloundMgr.cVideoInsertMax);
if (!(gameData.gDayInvVideo > gCloundMgr.cVideoInsertMax)) {
console.log("[弹出插屏]3判断", gameData.gMaxTower, gCloundMgr.cInsertVideoLevel);
gameData.gMaxTower < gCloundMgr.cInsertVideoLevel || this.scheduleOnce(function() {
console.log("[弹出插屏]执行");
shareData.toInterAD();
gameData.plus("gDayInvVideo", 1);
}, gCloundMgr.cVideoInsertDelay);
}
}
}
},
closeToNode: function(e) {
var t = this;
this._sp_bg && cc.isValid(this._sp_bg) && (this._sp_bg.active = !1);
gWindowMgr.closeBanner();
var i = cc.find("LayerDlg", cc.Canvas.instance.node), n = util.convetOtherNodeSpaceAR(e, i).clone(), o = cc.moveTo(.5, n), a = cc.scaleTo(.5, .1), s = cc.spawn(o, a), r = cc.callFunc(function() {
UICtrl.closeUI(t);
}), c = cc.sequence(s, r);
this.node.runAction(c);
},
onDisable: function() {
gWindowMgr.closeBanner();
this.openNextForceWindow();
},
setForceWindow: function(e) {
this._forceWindow = e;
},
openNextForceWindow: function() {
this._forceWindow && gWindowMgr.openNextForceWindow(this._forceWindow);
}
});
cc._RF.pop();
}, {} ],
uiWindowBuyTip: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "19a86LEvfhGhojyiMeVUs1Y", "uiWindowBuyTip");
cc.Class({
extends: e("uiWindowBase"),
properties: {},
start: function() {
var e = this;
webData.msgSendRecore(G_WINDOW_FROM.EXTTOWER);
var t = parseInt(gCloundMgr.cDropDoubleTowerNumber);
this.btn_ok.quickBt(function() {
gameData.plus("gQuickPower", t);
gWealthMgr.flyTowerFromNode(e.btn_ok, t);
UICtrl.closeUI(e);
});
this.btn_close.quickBt(function() {
gameData.plus("gQuickPower", 1);
gWealthMgr.flyTowerFromNode(e.btn_close, t);
UICtrl.closeUI(e);
});
console.log("TODO-uiWindowBuyTip-start()");
this.lbl_tip_2.getComponent(cc.Label).string = "额外获得" + t + "00个炮塔";
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiWindowDividendFrom: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "c5f84nCt6dB7qTl8b8skVJM", "uiWindowDividendFrom");
cc.Class({
extends: e("uiWindowBase"),
properties: {},
start: function() {
var e = this;
webData.msgSendRecore(G_WINDOW_FROM.DIDFROM);
this.btn_login.quickBt(function() {
UICtrl.closeUI(e);
UICtrl.openUI("uiWindows/uiWindowDividendLogin");
});
this.btn_close.quickBt(function() {
UICtrl.closeUI(e);
});
this.btn_sure.quickBt(function() {
UICtrl.closeUI(e);
});
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiWindowDividendInfo: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "e55edJjAWlCPrj+ANQJKdXw", "uiWindowDividendInfo");
cc.Class({
extends: e("uiWindowBase"),
properties: {},
start: function() {
var e = this;
this.btn_close.quickBt(function() {
UICtrl.closeUI(e);
});
this.btn_sure.quickBt(function() {
gameData.gMoney < 2e6 ? gWordMgr.showTip("兑换分红炮需要200元红包，红包不足") : gWordMgr.showTip("账号等级达到68级可兑换");
});
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiWindowDividendLogin: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "752447Me29M+bazSN7G6zXu", "uiWindowDividendLogin");
cc.Class({
extends: e("uiWindowBase"),
properties: {},
start: function() {
var e = this;
this.btn_from.quickBt(function() {
UICtrl.closeUI(e);
UICtrl.openUI("uiWindows/uiWindowDividendFrom");
});
this.btn_close.quickBt(function() {
UICtrl.closeUI(e);
});
if (gameData.gAllLoginDay >= 3) this.lbl_invite_complete.active = !0; else {
this.lbl_invite.active = !0;
this.lbl_invite.getComponent(cc.Label).string = "已登录:" + gameData.gAllLoginDay + "/3";
}
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiWindowFullUpdate: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "809eeQtw+lJxIRR+0pNoLUg", "uiWindowFullUpdate");
cc.Class({
extends: ui.baseDlg,
properties: {
_failed: !1
},
start: function() {
var e = this;
this.btn_sure.quickBt(function() {
e.download();
});
this.btn_close.quickBt(function() {
cc.game.end();
});
},
download: function() {
var e = this;
if (cc.sys.os != cc.sys.OS_IOS) if (this._failed) cc.sys.openURL(pageData._url_full_update); else {
this.btn_close.active = !1;
this.btn_sure.active = !1;
this.pro_download.active = !0;
this.lbl_note.getComponent(cc.Label).string = "正在下载中,请勿关闭.";
nativeData.InstallAPP(pageData.getAPKURL(), function(t) {
e.img_process.getComponent(cc.Sprite).fillRange = t / 100;
e.lbl_process.getComponent(cc.Label).string = t + "%";
}, function(t) {
e.pro_download.active = !1;
e.btn_install.active = !0;
e.btn_close.active = !0;
e.btn_install.quickBt(function() {
setTimeout(function() {
nativeData.InstallApk(t);
}, .1);
});
}, function() {
e._failed = !0;
e.lbl_note.getComponent(cc.Label).string = "下载失败,从网页或公众号下载.";
e.btn_close.active = !0;
e.btn_sure.active = !0;
e.pro_download.active = !1;
});
} else cc.sys.openURL(gCloundMgr.cIOSUrl);
}
});
cc._RF.pop();
}, {} ],
uiWindowMoneyBox: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "665e0hg2ENNSYdmxNggQ0UI", "uiWindowMoneyBox");
cc.Class({
extends: e("uiWindowBase"),
properties: {},
start: function() {
var e = this;
gameData.plus("gDayOpenGameBox", 1);
this._process = 0;
this._touchStop = !1;
this.btn_from.quickBt(function() {
e.touchAddProcess();
}, null, !0);
webData.msgSendRecore(G_WINDOW_FROM.MONEY_BOX);
},
touchAddProcess: function() {
this._process += 10;
this.img_process.getComponent(cc.Sprite).fillRange = this._process / 100;
if (!this._touchStop && this._process >= 70) {
this._touchStop = !0;
this.showAward();
}
},
update: function() {
this._process -= .5;
this._process < 0 && (this._process = 0);
this.img_process.getComponent(cc.Sprite).fillRange = this._process / 100;
},
showAward: function() {
var e = this, t = gCloundMgr.cShowMoneyBoxValue;
gameData.plus("gDayCombineBox", 1);
UICtrl.openUI("uiCommon/uiCommonMoney", function(i) {
i.initQQBoxMoney(G_MONEY_FROM.QQBOX, t, t, function() {
UICtrl.closeUI(e);
});
});
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiWindowStop: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "ee21eOsLTxMZIibigkU8txP", "uiWindowStop");
cc.Class({
extends: ui.baseDlg,
properties: {
notice_label: cc.Node
},
start: function() {
this.addEvents();
},
initData: function(e) {
this.notice_label.getComponent(cc.RichText).string = "<color=#000000>《打爆怪兽》正在停服维护，维护时间为</c><color=#ff0000>" + e + "</c><color=#000000>，感谢理解与支持。</color>";
},
addEvents: function() {
this.btn_close.quickBt(function() {
cc.game.end();
});
}
});
cc._RF.pop();
}, {} ],
uiWindowUnlock: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "480feeLqdRFo40yMKugAIVR", "uiWindowUnlock");
cc.Class({
extends: e("uiWindowBase"),
properties: {},
start: function() {
this.toShowInsertVideo();
this.showVideoTip();
},
showVideoTip: function() {
gVideoTipMgr.getIsShowVideoTipUnlock() && (this.lbl_video_tip.active = !0);
},
initData: function(e) {
this.initTower(e);
this.initEffect();
},
initTower: function(e) {
var t = this, i = towerCsvData.getAttacIconByID(e), n = towerCsvData.getAttackNameByID(e), o = towerCsvData.getUnlockPower(e);
util.display(this.img_tower, i);
this.lbl_tower_name.getComponent(cc.Label).string = "LV" + e + " " + n;
this.lbl_get_power.getComponent(cc.Label).string = "+" + o;
this.btn_get_power.quickBt(function() {
gameData.plus("gQuickPower", o);
gameData.plus("gPowerUnlock", o);
gWealthMgr.flyTowerFromNode(t.btn_get_power, o);
UICtrl.closeUI(t);
});
this.btn_close.quickBt(function() {
gameData.plus("gQuickPower", o);
gameData.plus("gPowerUnlock", o);
gWealthMgr.flyTowerFromNode(t.btn_close, o);
UICtrl.closeUI(t);
});
},
initEffect: function() {
var e = this, t = gMainMgr.getDividendPrpcess() / 100;
this.scheduleOnce(function() {
var i = e.img_process_dividend_bg.getContentSize().width, n = i * (t / 100) - i / 2;
gWordMgr.showArtEffect("effect/jingyantiao", e.img_process_dividend_bg, {
pos: cc.v2(n, 0)
});
}, .3);
}
});
cc._RF.pop();
}, {
uiWindowBase: "uiWindowBase"
} ],
uiWordCrit: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "36edfS4y6NJCJEAgZ++jUop", "uiWordCrit");
cc.Class({
extends: cc.Component,
properties: {
_bSpeed: 1e3,
_bPower: 10,
_bTarget: void 0
},
start: function() {},
initScript: function(e, t, i) {
this.node.position = e;
var n = t.toBitString();
i && (n = "j" + n);
this.getComponent(cc.Label).string = n;
var o = cc.moveBy(1, cc.v2(0, 150)), a = cc.scaleTo(.05, 1.5), s = cc.scaleTo(.4, 1), r = cc.fadeTo(.6, 0), c = cc.removeSelf(), l = cc.sequence(a, s, r, c), u = cc.spawn(o, l);
this.node.runAction(u);
}
});
cc._RF.pop();
}, {} ],
uiWord: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "65db9Syck9As5iei7sje2iB", "uiWord");
cc.Class({
extends: cc.Component,
properties: {
_bSpeed: 1e3,
_bPower: 10,
_bTarget: void 0
},
start: function() {},
initScript: function(e, t, i) {
this.node.position = e;
var n = t.toBitString();
i && (n = "j" + n);
this.getComponent(cc.Label).string = n;
var o = util.randomRange(1, 2), a = [ cc.v2(0, 0), cc.v2(40, 50), cc.v2(60, -300) ];
1 == o && (a = [ cc.v2(0, 0), cc.v2(-40, 50), cc.v2(-60, -300) ]);
var s = cc.fadeTo(.8, 0), r = cc.removeSelf(), c = cc.bezierBy(.8, a), l = cc.spawn(c, s), u = cc.sequence(l, r);
this.node.runAction(u);
}
});
cc._RF.pop();
}, {} ],
util: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "aa3bfT6IrBGtp77BtvVfeju", "util");
var n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
return typeof e;
} : function(e) {
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
}, o = {
display: function(e, t, i, n) {
e = e && e.node || e;
if (cc.isValid(e)) {
if (!e.__imgPath__ || e.__imgPath__ !== t) {
e.__imgPath__;
if (void 0 === t || "" === t) e.removeComponent(cc.Sprite); else if ("string" == typeof t) {
var o = e.getComponent(cc.Sprite) || e.addComponent(cc.Sprite);
if (i) {
var a = i + "/" + t;
cc.isValid(GM.hasLoadImg[a]) ? o.spriteFrame = GM.hasLoadImg[a] : cc.loader.loadRes(i, cc.SpriteAtlas, function(i, s) {
if (i) console.error(i.message || i); else if (cc.isValid(e)) {
var r = s._spriteFrames[t];
GM.hasLoadImg[a] = r;
o.spriteFrame = r;
n && n();
}
});
} else if (cc.isValid(GM.hasLoadImg[t])) {
o.spriteFrame = GM.hasLoadImg[t];
n && n();
} else cc.loader.loadRes(t, cc.SpriteFrame, function(i, a) {
if (i) console.error(i.message || i); else if (cc.isValid(e)) {
GM.hasLoadImg[t] = a;
o.spriteFrame = a;
n && n();
}
});
}
}
} else console.error("util.display arg1  mush be a cc.node component");
},
getSuffixName: function(e) {
var t = e.lastIndexOf("."), i = e.length;
return e.substring(t + 1, i);
},
loadUrlImg: function(e, t) {
cc.isValid(GM.hasLoadImg[t]) ? e.getComponent(cc.Sprite).spriteFrame = GM.hasLoadImg[t] : cc.loader.load({
url: t,
type: o.getSuffixName(t)
}, function(i, n) {
if (cc.isValid(e) && e.getComponent(cc.Sprite)) {
var o = new cc.SpriteFrame(n);
e.getComponent(cc.Sprite).spriteFrame = o;
GM.hasLoadImg[t] = o;
}
});
},
exto: function(e, t, i) {
i = i || 0;
if (e.getParent()) {
e.removeFromParent(!1);
t.addChild(e, i);
} else t.addChild(e, i);
},
setColor: function(e, t) {
e.color = t;
for (var i = e.getChildren(), n = 0; n < i.length; n++) o.setColor(i[n], t);
},
showArtEffect: function(e, t, i, n, o) {
null != e && "" != e && cc.loader.loadRes(e, cc.Prefab, function(e, a) {
if (e) console.error(e.message || e); else {
var s = cc.instantiate(a);
s.name = "gameAni";
i && s.setPosition(i);
if (cc.isValid(t)) {
t.addChild(s);
n && (s.getComponent(cc.Animation).Hurt = function() {
n();
});
s.getComponent(cc.Animation).on("stop", function(e, t) {
o || s.destroy();
}, t);
}
}
});
},
randomRange: function(e, t) {
t = t || 0;
e = e || 0;
var i = Math.random() * (t - e + 1);
return Math.floor(e + i);
},
randomListRange: function(e, t, i) {
for (var n = i || t - e + 1, o = [], a = e; a <= t; a++) o.push(a);
o.sort(function() {
return .5 - Math.random();
});
o.length = n;
return o;
},
isInteger: function(e) {
return Number(e) % 1 == 0;
},
SectionToChinese: function(e) {
for (var t = [ "零", "一", "二", "三", "四", "五", "六", "七", "八", "九" ], i = [ "", "十", "百", "千" ], n = "", o = "", a = 0, s = !0; e > 0; ) {
var r = e % 10;
if (0 === r) {
if (!s) {
s = !0;
o = t[r] + o;
}
} else {
s = !1;
n = t[r];
o = (n += i[a]) + o;
}
a++;
e = Math.floor(e / 10);
}
return o;
},
ChangeSerTimeToLocal: function(e) {
var t = e.substr(0, 19).replace(/T/, " "), i = new Date(t);
return Date.parse(i) / 1e3;
},
ChangeSerTimeToDay: function(e) {
return new Date(1e3 * e).getDate() || 1;
},
ChangeTimeToSeconds: function(e, t) {
var i = t || 3, n = parseInt(e / 3600), o = parseInt(e % 3600 / 60), a = e % 60 / 1;
n = ("0" + n).substr(-2);
o = ("0" + o).substr(-2);
a = ("0" + a).substr(-2);
return 3 == i ? n + ":" + o + ":" + a : 2 == i ? o + ":" + a : 1 == i ? a : -1 == i ? n + ":" + o : void 0;
},
changeDateFormat: function(e, t) {
e = parseInt(e);
var i = new Date(e), n = i.getDate();
n < 10 && (n = "0" + n);
var o = i.getFullYear(), a = i.getMonth() + 1;
a < 10 && (a = "0" + a);
var s = i.getHours();
s < 10 && (s = "0" + s);
var r = i.getMinutes();
r < 10 && (r = "0" + r);
var c = i.getSeconds();
c < 10 && (c = "0" + c);
switch (t) {
case 5:
return a + "-" + n + " " + s + ":" + r + ":" + c;

case 4:
return n + " " + s + ":" + r + ":" + c;

case 3:
return s + ":" + r + ":" + c;

case -3:
return o + "." + a + "." + n;

default:
return o + "-" + a + "-" + n + " " + s + ":" + r + ":" + c;
}
},
changeDateFormat2: function(e, t) {
var i = t || 3;
e = parseInt(1e3 * e);
var n = new Date(e), o = n.getDate();
o < 10 && (o = "0" + o);
var a = n.getFullYear(), s = n.getMonth() + 1;
s < 10 && (s = "0" + s);
switch (i) {
case 2:
return s + "月" + o + "日";

default:
return a + "年" + s + "月" + o + "日";
}
},
dateDifference: function(e, t) {
if (!e || !t) return 0;
var i = new Date(1e3 * e);
i.setHours(0);
i.setMinutes(0);
i.setSeconds(0);
var n = new Date(1e3 * t);
n.setHours(0);
n.setMinutes(0);
n.setSeconds(0);
return Math.floor((n - i) / 864e5);
},
loadCustomResources: function(e, t, i) {
var n = e || 0;
cc.loader.loadResDir(t[n], function(e, t, i) {}.bind(this), function(e, a, s) {
if (++n < t.length) o.loadCustomResources(n, t, i); else {
console.log("资源加载完成");
i && i();
}
}.bind(this));
},
isNull: function(e) {
return void 0 === e || ("" === e || (null === e || !1 === e));
},
copyObj: function(e, t) {
t = t || {};
for (var i in e) if ("object" === n(e[i])) {
t[i] = e[i].constructor === Array ? [] : {};
o.copyObj(e[i], t[i]);
} else t[i] = e[i];
return t;
},
copyArr: function(e) {
return JSON.parse(JSON.stringify(e));
},
convetOtherNodeSpace: function(e, t) {
if (!e || !t) return null;
var i = this.localConvertWorldPoint(e);
return this.worldConvertLocalPoint(t, i);
},
convetOtherNodeSpaceAR: function(e, t) {
if (!e || !t) return null;
var i = this.localConvertWorldPointAR(e);
return this.worldConvertLocalPointAR(t, i);
},
localConvertWorldPointAR: function(e) {
return e ? e.convertToWorldSpaceAR(cc.v2(0, 0)) : null;
},
localConvertWorldPoint: function(e) {
return e ? e.convertToWorldSpace(cc.v2(0, 0)) : null;
},
worldConvertLocalPointAR: function(e, t) {
return e ? e.convertToNodeSpaceAR(t) : null;
},
worldConvertLocalPoint: function(e, t) {
return e ? e.convertToNodeSpace(t) : null;
},
cutstr: function(e, t) {
if (!e) return "";
var i, n = 0, o = "";
i = e.length;
for (var a = 0; a < i; a++) {
var s = e.charAt(a);
n++;
escape(s).length > 4 && n++;
o = o.concat(s);
if (n >= t) return o = o.concat("...");
}
return n < t ? e : void 0;
},
calcTwoPointDistance: function(e, t) {
var i = Math.abs(e.x - t.x), n = Math.abs(e.y - t.y);
return Math.sqrt(Math.pow(i, 2) + Math.pow(n, 2));
},
getStrLength: function(e) {
var t = 0;
for (var i in e) {
var n = e.charCodeAt(i);
t += n > 32 && n < 127 ? 5 / 9 : 1;
}
return t;
},
checkSameDay: function(e) {
if (!e || "" == e) return !1;
var t = new Date(e), i = new Date();
return t.getFullYear() == i.getFullYear() && t.getMonth() == i.getMonth() && t.getDate() == i.getDate();
},
random: function(e, t) {
return Math.floor(Math.random() * (t - e + 1) + e);
},
find: function(e, t) {
if (t < Math.min.apply(null, e)) return 0;
if (t > Math.max.apply(null, e)) return e.length - 1;
for (var i = 0, n = 0, o = e.length; n < o; n++) if (e[n] > t) {
i = n;
break;
}
return i;
},
createConfuseClass: function() {
for (var e = "", t = 0; t < 20; t++) {
e += "class " + this.createConfuseStr() + "{\n";
for (var i = 0; i < 10; i++) {
e += "    " + this.createConfuseStr() + "(name){\n";
e += "        let " + this.createConfuseStr() + "= name;\n";
e += "    }\n";
}
e += "}\n";
}
return e;
},
createConfuseStr: function() {
for (var e = "", t = "abcdefjhigklmnopqrstvswsyz".length, i = 0; i < 20; i++) e += "abcdefjhigklmnopqrstvswsyz".charAt(Math.round(Math.random() * (t - 1)));
return e;
},
getCirclePByR: function(e, t) {
for (var i = [], n = 360 / t, o = 0; o < 360; o += n) {
var a = Math.floor(e * Math.cos(3.14 * o / 180)), s = Math.floor(e * Math.sin(3.14 * o / 180));
i.push(cc.v2(a, s));
}
return i;
}
};
window.util && (o.str2Arr = window.util.str2Arr || function(e) {
return [];
});
o.filterStr = function(e) {
return e ? e.replace(/[^\u4e00-\u9fa5a-zA-Z0-9]/gi, "□") : "";
};
o.getWeakEnd = function() {
var e = new Date(), t = new Date();
t.setMonth(0);
t.setDate(1);
var i = e - t, n = Math.ceil(i / 864e5);
return Math.ceil(n / 7);
};
o.frameResize = function() {
var e = cc.Canvas.instance.designResolution, t = cc.view.getFrameSize();
if (t.width / t.height > e.width / e.height) {
cc.Canvas.instance.fitHeight = !0;
console.log("[游戏适配方案fitHeight]");
} else {
cc.Canvas.instance.fitWidth = !0;
console.log("[游戏适配方案fitWidth]");
}
};
o.removeFromArray = function(e, t) {
for (var i = e.length, n = 0; n < i; n++) if (e[n] === t) {
if (0 === n) {
e.shift();
return e;
}
if (n === i - 1) {
e.pop();
return e;
}
e.splice(n, 1);
return e;
}
};
o.getDisHeight = function() {
var e = cc.view.getFrameSize().height / cc.view.getFrameSize().width;
if (e > 1.95) {
return 360 * (e - 1280 / 720);
}
return 0;
};
o.formatDecimal = function(e, t) {
var i = (e = e.toString()).indexOf(".");
e = -1 !== i ? e.substring(0, t + i + 1) : e.substring(0);
return parseFloat(e).toFixed(t);
};
o.getDesByTime = function(e) {
return e > 0 && e <= 6 ? "凌晨" : e > 6 && e <= 11 ? "上午" : e > 11 && e <= 13 ? "中午" : e > 13 && e <= 18 ? "下午" : "晚上";
};
o.getUserIP = function(e) {
if (cc.sys.isBrowser) {
var t = new (window.RTCPeerConnection || window.mozRTCPeerConnection || window.webkitRTCPeerConnection)({
iceServers: []
}), i = function() {}, n = {}, o = /([0-9]{1,3}(\.[0-9]{1,3}){3}|[a-f0-9]{1,4}(:[a-f0-9]{1,4}){7})/g;
t.createDataChannel("");
t.createOffer().then(function(e) {
e.sdp.split("\n").forEach(function(e) {
e.indexOf("candidate") < 0 || e.match(o).forEach(a);
});
t.setLocalDescription(e, i, i);
}).catch(function(e) {});
t.onicecandidate = function(e) {
e && e.candidate && e.candidate.candidate && e.candidate.candidate.match(o) && e.candidate.candidate.match(o).forEach(a);
};
} else e();
function a(t) {
n[t] || e(t);
n[t] = !0;
}
};
o.setHead = function(e, t, i, n, o) {
i && "" != i && -1 != i.indexOf("/") ? cc.loader.load({
url: i,
type: "png"
}, function(i, a) {
if (cc.isValid(t)) if (i) o(); else {
e.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(a);
n && n();
}
}) : o && o();
}, t.exports = o;
cc._RF.pop();
}, {} ],
webData: [ function(e, t, i) {
"use strict";
cc._RF.push(t, "ea50582GspAU5R8HlupHiYh", "webData");
var n = e("baseData"), o = cc.Class({
extends: n,
name: "webData",
properties: {
_url_cPlus: "https://bzxgs-ii-game.yx0599.com/get.cgi"
},
init: function() {
window.ISFORMAL || (this._url_cPlus = "http://dbgs_red.inner-ng.0599yx.com:8012/get.cgi");
},
toHTTPPost: function(e, t, i, n) {
var o = {
param: JSON.stringify(e)
};
n && (o = {
regparam: JSON.stringify(e)
});
HTTP.GET(this._url_cPlus, o, function(e) {
if (e && !e.ErrCode && -1e4 != e.code) t && t(e); else {
console.log("[返回WEB错误]", e);
i && i(e);
}
}, function() {
console.log("[返回HTTP错误]");
i && i();
});
},
toLoginGame: function(e) {
var t = this;
this.msgSendRecore(G_WINDOW_FROM.WXLOGIN);
console.log("[登录]判断该OPENID是否存在", e);
this.msgVerifyUser(e, function() {
console.log("[登录]用户存在进入游戏");
cc.Canvas.instance.node.getComponent("main").enterHall();
G_FRAME.IS_NEWUSER = !1;
}, function() {
console.log("[登录]用户不存在先完善信息");
G_FRAME.IS_NEWUSER = !0;
t.msgFillInfo(function() {
cc.Canvas.instance.node.getComponent("main").enterHall();
}, function() {
UICtrl.findUI("uiFrame/uiWXLogin") || UICtrl.openUI("uiFrame/uiWXLogin");
gWordMgr.showTip("无法登陆服务器，请检查网络状态");
});
});
},
msgVerifyUser: function(e, t, i) {
var n = nativeData.getBindData();
console.log("[注册信息promoter]", n);
this.toHTTPPost({
openid: e,
MsgID: 1
}, function(e) {
if (0 == e.UserID) i(); else {
gameData.userID = e.UserID;
gameData.tokenID = e.TokenID;
gameData.tokenJM = MD5(gameData.tokenID + G_FRAME.JMSTR);
t();
}
}, function() {
console.log("[校验用户是否存在失败]");
gWordMgr.showTip("网络错误,请重登");
}, !0);
},
msgFillInfo: function(e, t) {
var i = this;
console.log("[注册信息openid]", gameData.openid);
console.log("[注册信息nickname]", gameData.nickname);
console.log("[注册信息headWeb]", gameData.headWeb);
console.log("[注册信息token]", gameData.token);
console.log("[注册信息unionid]", gameData.unionid);
var n = nativeData.getBindData();
console.log("[注册信息promoter]", n);
var o = nativeData.getChannelCode();
console.log("[注册信息channel]", o);
var a = nativeData.getDerviceID(), s = nativeData.getMac(), r = s.replace(/:/g, ""), c = MD5(r);
console.log("[注册信息sMac]", c);
var l = nativeData.getImei(0), u = MD5(l);
console.log("[注册信息imei1]", u);
var h = nativeData.getImei(1), d = MD5(h);
console.log("[注册信息sImei2]", d);
var g = nativeData.getMeid(), f = MD5(g);
console.log("[注册信息sMeid]", f);
var p = nativeData.getAndroidVersion();
console.log("[注册信息androVersion]", p);
var m = p >= 29, _ = nativeData.getOAID();
console.log("[注册信息oaid]", _);
m && (a = _);
var v = 1;
cc.sys.os == cc.sys.OS_IOS && (v = 2);
gameData.token ? this.toHTTPPost({
openid: gameData.openid,
unionid: gameData.unionid,
nickname: gameData.nickname,
headurl: gameData.headWeb,
token: gameData.token,
OS: v,
promoter: n,
channel: o,
deviceno: a,
imei1: u,
imei2: d,
imei2_ori: h,
mac: c,
mac_ori: s,
meid: f,
oaid: _,
android10: m,
MsgID: 2
}, function(t) {
if (0 == t.Success) UICtrl.openUI("uiFrame/uiWXLogin"); else {
gameData.userID = t.UserID;
gameData.tokenID = t.TokenID;
gameData.tokenJM = MD5(gameData.tokenID + G_FRAME.JMSTR);
e();
nativeData.gameRegister();
if (nativeData.shareIndex) {
var n = nativeData.shareIndex + 210;
i.msgSendRecore(n);
}
}
}, function() {
t();
}, !0) : UICtrl.openUI("uiFrame/uiWXLogin");
},
msgLogin: function(e) {
var t = this;
this.toHTTPPost({
UserID: gameData.userID,
TokenID: gameData.tokenID,
MsgID: 11
}, function(i) {
t.loginBackSaveData(i, e);
gVideoTipMgr.setCityHide();
}, function() {
gWordMgr.showTip("登录失败请重新登陆");
});
},
toLoginGameTourist: function() {
var e = this, t = nativeData.getDerviceID();
this.msgVerifyUser(t, function() {
console.log("[登录]用户存在进入游戏");
cc.Canvas.instance.node.getComponent("main").enterHall();
G_FRAME.IS_NEWUSER = !1;
}, function() {
console.log("[登录]用户不存在先完善信息");
G_FRAME.IS_NEWUSER = !0;
e.msgFillInfoTourist(function() {
cc.Canvas.instance.node.getComponent("main").enterHall();
}, function() {
UICtrl.findUI("uiFrame/uiWXLogin") || UICtrl.openUI("uiFrame/uiWXLogin");
gWordMgr.showTip("无法登陆服务器，请检查网络状态");
});
});
},
msgFillInfoTourist: function(e, t) {
var i = nativeData.getDerviceID();
this.toHTTPPost({
imei: i,
MsgID: 9990
}, function(t) {
if (0 == t.Success) UICtrl.openUI("uiFrame/uiWXLogin"); else {
gameData.userID = t.UserID;
gameData.tokenID = t.TokenID;
gameData.tokenJM = MD5(gameData.tokenID + G_FRAME.JMSTR);
e();
}
}, function(e) {
t();
}, !0);
},
msgRank: function(e, t, i) {
this.toHTTPPost({
UserID: gameData.userID,
TokenID: gameData.tokenID,
StarIndex: e.StarIndex,
GetOwnRank: e.GetOwnRank,
MsgID: 116
}, function(e) {
t(e);
}, function() {
i();
});
},
msgSaveVideo: function(e, t, i) {
var n = this;
console.log("TODO-webData-msgSaveVideo()1[记录看视频]e=" + e + " i=" + JSON.stringify(i));
var o = gameData.gServerTime, a = "video" + gameData.userID + o;
a = MD5(a);
var s = nativeData.network_placement_id, r = 1;
8 == nativeData.network_firm_id ? r = 2 : 22 == nativeData.network_firm_id ? r = 3 : 28 == nativeData.network_firm_id && (r = 4);
console.log("TODO-webData-msgSaveVideo()2o=" + o + " a=" + a + " r=" + r + " nativeData.network_placement_id=" + nativeData.network_placement_id + " nativeData.network_firm_id=" + nativeData.network_firm_id);
this.toHTTPPost({
UserID: gameData.userID,
TokenID: gameData.tokenID,
Type: e,
SdkType: r,
VideoID: s,
Time: o,
Key: a,
MsgID: 16
}, function(e) {
gameData.plus("gDayVideoCount", 1);
gameData.plus("gAllVideoCount", 1);
gFunctionMgr.addPlayerExp(G_EXP_FROM.VIDEO, gameData.gDayVideoCount);
dividendCsvData.addProcess(4);
gameData.gDayVideoCount <= gCloundMgr.cDropPointMax && gWealthMgr.flyFriendGroupPowerOne();
var o = 0;
o = i.videoIndex >= 10 ? i.videoIndex + 60 : i.videoIndex + 90;
n.msgSendRecore(o);
t && t();
console.log("[记录看视频返回]o=" + o + " i.videoIndex=" + i.videoIndex);
}, function() {
0;
});
},
msgSaveMoney: function(e, t, i) {
//console.log("[记录获得红包]", e);
this.toHTTPPost({
UserID: gameData.userID,
TokenID: gameData.tokenID,
Type: e,
Red: parseInt(t),
MsgID: 17
}, function(n) {
gFunctionMgr.insertMoneyRecord(e, t);
i && i();
//console.log("记录获得红包返回");
}, function() {});
},
msgSaveLevel: function(e, t) {
console.log("[升级]");
var i = "lwhydbgs" + gameData.userID + e;
i = MD5(i);
this.toHTTPPost({
UserID: gameData.userID,
TokenID: gameData.tokenID,
Level: e,
MsgID: 18,
Key: i
}, function(e) {
if (e.Success) {
t && t();
console.log("[升级返回]", e);
} else gWordMgr.showTip("网络错误，请重启");
}, function() {});
},
msgGetServerTime: function(e) {
console.log("[升级]");
this.toHTTPPost({
UserID: gameData.userID,
TokenID: gameData.tokenID,
MsgID: 12
}, function(t) {
e && e();
console.log("获得系统时间", t);
}, function() {});
},
msgSaveGameData: function() {
console.log("[记录存档]");
var e = [ {
Data: gFunctionMgr.getSaveData(),
Type: 1
} ], t = [ {
Num: gameData.gPowerAuto,
Type: 1
}, {
Num: gameData.gPowerVideo,
Type: 2
}, {
Num: gameData.gPowerRoller,
Type: 3
}, {
Num: gameData.gPowerUnlock,
Type: 4
}, {
Num: gameData.gPowerDrop,
Type: 5
} ];
this.toHTTPPost({
UserID: gameData.userID,
TokenID: gameData.tokenID,
OutList: t,
DataList: e,
GameTime: gameData.gCurrOnlineTime,
MsgID: 14
}, function(e) {
console.log("记录存档返回1", e);
}, function() {console.log("记录存档返回2", JSON.stringify(e));});
gameData.set("gPowerAuto", 0);
gameData.set("gPowerVideo", 0);
gameData.set("gPowerRoller", 0);
gameData.set("gPowerUnlock", 0);
gameData.set("gPowerDrop", 0);
gameData.set("gCurrOnlineTime", 0);
},
msgGetGameData: function(e) {
console.log("[获取存档]不存在存档", gameData.gMoney);
this.toHTTPPost({
UserID: gameData.userID,
TokenID: gameData.tokenID,
MsgID: 15
}, function(t) {
var i = t.DataList;
if (i && i[0] && i[0].Data) {
var n = i[0].Data;
gFunctionMgr.setSaveData(n);
console.log("获取存档返回", t);
e && e();
} else e && e();
}, function() {});
},
msgSendRecore: function(e) {
if (e > 100 && e < 200) {
var t = gameData.readValue("localHall");
console.log("TODO-webData-msgSendRecore()e=" + e + " t=" + t);
if (1 == t) return;
if (t > e) return;
gameData.set("localHall", e);
gameData.storeValue("localHall");
}
console.log("[埋点]", e);
this.toHTTPPost({
UserID: gameData.userID,
TokenID: gameData.tokenID,
MsgID: 19,
Type: e
}, function(t) {
callback && callback();
console.log("埋点返回", e, t);
}, function() {});
},
msgGetSharePath: function(e) {
console.log("[获取分享地址]");
this.toHTTPPost({
UserID: gameData.userID,
TokenID: gameData.tokenID,
MsgID: 20
}, function(t) {
var i = "http://" + t.Url;
e && e(i);
}, function() {});
},
msgGetChannelVideo: function(e) {
var t = 1;
t = cc.sys.os == cc.sys.OS_IOS ? gameData.gChannel : nativeData.getChannelCode();
this.toHTTPPost({
UserID: gameData.userID,
TokenID: gameData.tokenID,
MsgID: 5,
cl: t
}, function(t) {
gCloundMgr.setChannelVideo(t);
e && e();
}, function() {
gWordMgr.showTip("登录失败请重新登陆");
});
},
msgToSignMoney: function(e, t) {
this.toHTTPPost({
UserID: gameData.userID,
TokenID: gameData.tokenID,
MsgID: 22
}, function(t) {
e && e();
}, function() {
t && t();
});
},
msgGetPhonePices: function(e, t, i, n) {
console.log("[获得了碎片]", t, i);
this.toHTTPPost({
UserID: gameData.userID,
TokenID: gameData.tokenID,
Type: e,
ID: t,
Num: i,
MsgID: 23
}, function(e) {
n && n();
}, function() {});
},
msgGetBoxUserInfo: function(e) {
this.toHTTPPost({
UserID: gameData.userID,
TokenID: gameData.tokenID,
MsgID: 7
}, function(t) {
gameData.gBoxUser = t.BoxUser;
e && e();
}, function() {});
},
msgSendBoxUserInfo: function() {
this.toHTTPPost({
UserID: gameData.userID,
TokenID: gameData.tokenID,
MsgID: 6
}, function(e) {}, function() {});
},
loginBackSaveData: function(e, t) {
var i = this;
console.log("[服务端登录返回]");
gameData.initSaveData();
gameData.set("gRegTime", e.RegTime);
gameData.set("gSignMoney", e.SignCount);
gameData.set("gSignMoneyTime", e.SignTime);
gameData.set("gBoxUser", e.BoxUser);
gameData.set("gInviteCount", e.InviteCount);
gameData.set("gServerTime", e.ServerTime);
gameData.set("gMaxTower", e.Level);
gameData.set("gChannel", e.cl);
gFriendGroupMgr.groupLevel = e.UnionLevel;
this.loginData = e;
this.setNewUserOrOldUser();
if (gameData.gMoney || G_FRAME.IS_NEWUSER) {
this.loginBackFirstReset(e.LoginTime, e.ServerTime);
this.loginBackSetGameData(e);
t();
} else this.msgGetGameData(function() {
i.loginBackFirstReset(e.LoginTime, e.ServerTime);
i.loginBackSetGameData(e);
t();
});
var n = new Date(1e3 * e.ServerTime).getHours();
n >= 12 && !gameData.gDayResetOver12 && gMainMgr.resetClockData(12);
n >= 18 && !gameData.gDayResetOver18 && gMainMgr.resetClockData(18);
},
setNewUserOrOldUser: function() {
var e = new Date().getTime();
util.dateDifference(gameData.gRegTime, Math.floor(e / 1e3)) + 1 <= 1 ? gameData.set("gOnFirstDay", !0) : gameData.set("gOnFirstDay", !1);
},
loginBackSetGameData: function(e) {
var t = parseInt(e.Red) + parseInt(gameData.gNowDropMoney);
gameData.set("gMoney", t);
},
loginBackFirstReset: function(e, t) {
if (gFunctionMgr.isFirstLoginToday(e, t)) {
console.log("[今天第一次登陆]", e, t);
gMainMgr.resetClockData(0);
dividendCsvData.addProcess(5);
gameData.plus("gAllLoginDay", 1);
}
gFunctionMgr.updatePlayerLevelByExp();
},
msgGetContributeRecord: function(e) {
this.toHTTPPost({
UserID: gameData.userID,
TokenID: gameData.tokenID,
MsgID: 112
}, function(t) {
var i = [];
if (t.List) for (var n in t.List) if (t.List[n] && t.List[n].Record) {
var o = JSON.parse(t.List[n].Record);
i.push(o);
}
if (i.length <= 0) {
var a = {
SelfExp: 0,
TdExp: 0,
TsExp: 0,
Time: Math.floor(new Date().getTime() / 1e3)
};
i.push(a);
}
e && e(i);
}, function() {});
},
msgBindPromoter: function(e, t) {
this.toHTTPPost({
UserID: gameData.userID,
TokenID: gameData.tokenID,
Promoter: e,
MsgID: 108
}, function(e) {
t && t();
}, function(e) {
e && e.ErrCode && 3002 == e.ErrCode ? gWordMgr.showTip("注册已超过24小时,不能拜师") : e && e.ErrCode && 3003 == e.ErrCode ? gWordMgr.showTip("已存在师傅,不能拜师") : e && e.ErrCode && 3004 == e.ErrCode ? gWordMgr.showTip("不能绑定自己") : e && e.ErrCode && 3005 == e.ErrCode ? gWordMgr.showTip("该用户不存在") : e && e.ErrCode && 3011 == e.ErrCode ? gWordMgr.showTip("绑定的是自己的徒弟，无法绑定") : e && e.ErrCode && 3012 == e.ErrCode ? gWordMgr.showTip("绑定的是自己的徒孙，无法绑定") : gWordMgr.showTip("绑定失败");
});
},
msgGetUnionData: function(e) {
this.toHTTPPost({
UserID: gameData.userID,
TokenID: gameData.tokenID,
MsgID: 100
}, function(t) {
e && e(t);
}, function() {});
},
msgGetUnionMemberInfo: function(e, t, i) {
this.toHTTPPost({
UserID: gameData.userID,
TokenID: gameData.tokenID,
MemberID: t,
Type: e,
MsgID: 105
}, function(e) {
i && i(e);
}, function() {});
},
msgGetUnionApprenticeList: function(e, t) {
this.toHTTPPost({
UserID: gameData.userID,
TokenID: gameData.tokenID,
Page: e,
MsgID: 103
}, function(e) {
t && t(e);
}, function() {});
},
msgGetUnionDiscipleList: function(e, t) {
this.toHTTPPost({
UserID: gameData.userID,
TokenID: gameData.tokenID,
Page: e,
MsgID: 104
}, function(e) {
t && t(e);
}, function() {});
},
msgGetUnionPowerAward: function(e) {
this.toHTTPPost({
UserID: gameData.userID,
TokenID: gameData.tokenID,
MsgID: 106
}, function(t) {
e && e(t);
}, function() {});
},
msgGetUnionTimeAward: function(e) {
this.toHTTPPost({
UserID: gameData.userID,
TokenID: gameData.tokenID,
MsgID: 107
}, function(t) {
e && e(t);
}, function() {});
},
msgReceiveInvitationAward: function(e, t) {
this.toHTTPPost({
UserID: gameData.userID,
TokenID: gameData.tokenID,
ID: e,
MsgID: 109
}, function(e) {
t && t(e);
}, function(e) {
e && e.ErrCode && 3007 == e.ErrCode ? gWordMgr.showTip("当前邀请人数不足，无法领取") : e && e.ErrCode && 3006 == e.ErrCode && gWordMgr.showTip("请先领取前一个奖励");
});
},
msgReceivePowerAward: function(e, t, i) {
this.toHTTPPost({
UserID: gameData.userID,
TokenID: gameData.tokenID,
ReceiveID: e,
Type: t,
MsgID: 110
}, function(e) {
i && i(e);
}, function(e) {});
},
msgReceiveAllPowerAward: function(e) {
this.toHTTPPost({
UserID: gameData.userID,
TokenID: gameData.tokenID,
MsgID: 111
}, function(t) {
e && e(t);
}, function(e) {});
},
msgPlayerUP: function(e) {
var t = "accountlevel" + gameData.userID + e;
t = MD5(t);
this.toHTTPPost({
UserID: gameData.userID,
TokenID: gameData.tokenID,
Level: e,
MsgID: 21,
Key: t
}, function(e) {});
},
msgGameLevelRed: function(e, t, i) {
this.toHTTPPost({
UserID: gameData.userID,
TokenID: gameData.tokenID,
Level: e,
MsgID: 114
}, function(e) {
t && t();
}, function(t) {
if (t && t.ErrCode && 3013 == t.ErrCode) {
gameData.set("gLevelRedAward", e);
i && i();
} else gWordMgr.showTip("领取失败");
});
},
msgGetUnionTip: function() {
this.toHTTPPost({
UserID: gameData.userID,
TokenID: gameData.tokenID,
MsgID: 113
}, function(e) {
e.UnionWaitAllExp > 0 ? gameData.hasFamilyTip = !0 : gameData.hasFamilyTip = !1;
gameData.send("moduleTipUpdate", G_WINDOW_FROM.FAMILY);
}, function(e) {});
},
msgRunTurntable: function(e, t) {
this.toHTTPPost({
UserID: gameData.userID,
TokenID: gameData.tokenID,
MsgID: 201,
Type: e
}, function(e) {
t && t(e.ID, e.Amount);
console.log("抽奖返回");
}, function() {});
},
msgGetTurntableInfo: function(e) {
var t = this;
this.toHTTPPost({
UserID: gameData.userID,
TokenID: gameData.tokenID,
MsgID: 200
}, function(i) {
t._turntableInfo = i;
var n = [ parseInt(t._turntableInfo.LevelNum), parseInt(t._turntableInfo.TaskNum), parseInt(t._turntableInfo.InviteNum), parseInt(t._turntableInfo.SuperNum) ];
gTurntableMgr.setLessTurntableTime(n);
e && e();
}, function() {});
},
getturntableInfo: function() {
return this._turntableInfo || {};
},
msgCompleteTask: function(e) {
var t = "lwhy" + gameData.userID + "task";
t = MD5(t);
this.toHTTPPost({
UserID: gameData.userID,
TokenID: gameData.tokenID,
MsgID: 24,
Time: gameData.gServerTime,
Key: t
}, function(t) {
t.Success && e && e();
}, function(e) {});
}
});
window.webData = new o();
cc._RF.pop();
}, {
baseData: "baseData"
} ]
}, {}, [ "UICtrl", "md5", "protobuf", "runtime", "baseData", "csvData", "HTTP", "baseDlg", "baseLayer", "baseNode", "uiHotUpdate", "uiScrollView", "uiScrollViewExt", "captureNode", "drawQRCode", "util", "audioData", "gameData", "nativeData", "pageData", "shareData", "webData", "TTQRcode", "nodeExitGame", "nodeLoading", "uiFramePolicy", "uiHall", "uiWXLogin", "uiWindowFullUpdate", "uiWindowStop", "main", "uiUpdate", "baseAdData", "lwAdConfig", "lwAdSdk", "uiAdDemo", "uiBanner", "uiBaseLwAd", "uiFeed", "uiInteraction", "uiRewardVideo", "uiSplash", "Global", "gBuffMgr", "gBulletMgr", "gCloundMgr", "gFreeLotteryMgr", "gFriendGroupMgr", "gFunctionMgr", "gGuideMgr", "gMainMgr", "gMapMgr", "gMonsterMgr", "gProtoMgr", "gTipsMgr", "gTowerMgr", "gTurntableMgr", "gVideoTipMgr", "gWealthMgr", "gWindowMgr", "gWordMgr", "init", "NPCNameData", "bulletCsvData", "cdMoneyCsvData", "configCsvData", "dividendCsvData", "dropBoxCsvData", "familyLevelCsvData", "familySettingCsvData", "familyTimesCsvData", "itemCsvData", "levelExpCsvData", "levelMoneyCsvData", "lotteryDivdendCsvData", "luckyRollerData", "monsterCsvData", "newMoneyCsvData", "onLineMoneyCsvData", "signCsvData", "stageCsvData", "supplyTowerCsvData", "taskAchieveCsvData", "taskDailyCsvData", "taskDivdendCsvData", "towerCsvData", "nodeBtnWithDrawal", "uiActiveWithdrawal", "uiCommonMoney", "uiCommonMoneyGet", "uiCommonSupply", "uiCommonTip", "uiDividend", "uiBossWarn", "uiWinEnd", "nodeRotationRepeat", "uiFreeLottery", "uiFreeLotteryAddress", "uiFreeLotteryAward", "uiFreeLotteryBanner", "uiFreeLotteryDouble", "uiFreeLotteryRecord", "uiFreeLotteryRule", "uiFreeLotterySupply", "uiFriendGroup", "uiFriendGroupAward", "uiFriendGroupAwardInfo", "uiFriendGroupContributionDesc", "uiFriendGroupDescription", "uiFriendGroupEarnings", "uiFriendGroupHumenInfo", "uiFriendGroupInvite", "uiFriendGroupMaster", "uiFriendGroupNodeLine", "uiFriendGroupNodePlatform", "uiFriendGroupNodeTouch", "uiFriendGroupPoint", "uiFriendGroupPointWord", "uiFriendGroupRecord", "uiFriendGroupRedDesc", "uiFriendGroupShare", "uiFriendGroupShare2", "uiFriendGroupShareConfirm", "uiFriendGroupSonItem", "uiFriendGroupSonList", "uiFriendGroupWallet", "uiFriendGroupWalletDescription", "uiFriendGroupWalletRecord", "uiFriendGroupWalletRecordDetails", "nodeBtnGameBox", "uiGameBox", "uiBulletBase", "uiBulletLaser", "uiBulletLight", "uiBulletMissile", "uiBulletStraight", "nodBtnBreath", "nodeDividend", "nodeFriendGroupTip", "nodeMoveToMiddle", "nodeNotice", "uiCombineEffect", "uiFallBox", "uiFlowMoney", "uiFlyBezierTower", "uiFlyCricleMoney", "uiFlyLineMoney", "uiFlyLineUnion", "uiFlyLineUnionOne", "uiFlySingleMoney", "uiGameQuickBuild", "uiGameTowerInfo", "uiMonster", "uiTower", "uiTowerBox", "uiWord", "uiWordCrit", "uiCombineFail", "uiGame", "uiGuideArraw", "uiGuideFinger", "uiGuideLayer", "uiGuideTip", "uiInvite", "nodeBtnMoney", "uiLevelMoney", "uiLevelRed", "uiLevelRedSource", "uiLoading", "monsterDeath", "uiMoreGame", "nodeBtnNew", "uiNewMoney", "uiRank", "nodeBtnRoller", "uiRoller", "uiRoller2", "uiSetting", "uiShop", "nodeBtnSign", "uiSign", "uiSignOnline", "nodeBtnTask", "uiTask", "nodeTimeMoney", "uiTip", "uiTip2", "nodeBtnTurntable", "nodeLabelTip", "uiTurntable", "uiVideoTipAfterVideo", "uiVideoTipLevelUP", "uiVideoTipWallet", "uiVideoTipWallet2", "nodeQuickSign", "uiWallet", "uiWalletDes", "uiWalletItem", "uiWalletRecord", "uiWindowBase", "uiWindowBuyTip", "uiWindowDividendFrom", "uiWindowDividendInfo", "uiWindowDividendLogin", "uiWindowMoneyBox", "uiWindowUnlock" ]);